gitBranch static method
Implementation
static Future<String> gitBranch() async {
final result =
await Process.run('git', ['rev-parse', '--abbrev-ref', 'HEAD']);
if (result.exitCode != 0) {
throw Exception('Error running git command: ${result.stderr}');
}
return (result.stdout as String).trim();
}