fetch method

Future<void> fetch({
  1. String? remote,
  2. bool prune = false,
  3. String? workDir,
})

Fetches from a remote.

Implementation

Future<void> fetch({
  String? remote,
  bool prune = false,
  String? workDir,
}) async {
  final args = <String>['fetch'];
  if (prune) args.add('--prune');
  if (remote != null) args.add(remote);
  await _runGit(args, workDir: workDir ?? defaultWorkDir);
}