currentBranch function
Get the current branch name.
Implementation
Future<String?> currentBranch({String? dir}) async {
final result = await runGit([
'branch',
'--show-current',
], workingDirectory: dir);
return result.success ? result.output : null;
}