renameBranch function

Future<bool> renameBranch({
  1. required String branchName,
})

Implementation

Future<bool> renameBranch({required String branchName}) async {
  final process = await Process.start("git", ['branch', '-M', branchName]);
  await stdout.addStream(process.stdout);
  await stderr.addStream(process.stderr);
  await process.exitCode;
  return checkProcessCode(await process.exitCode);
}