init method

Future<bool> init(
  1. String directoryToInit
)

Performs a git init in a local directory. If the supplied directory does not exist it will be created.

Implementation

Future<bool> init(String directoryToInit) async {
  await Directory(directoryToInit).create(recursive: true);
  ProcessResult processResult = await git_service.runGit(['init'],
      throwOnError: false,
      echoOutput: false,
      processWorkingDir: directoryToInit);

  return processResult.exitCode == 0;
}