checkout method
git checkout
the specified branchToCheckout
on the localCheckoutDirectory
.
Returns true if the operation has been completed successfully.
Implementation
Future<bool> checkout(
String localCheckoutDirectory, String branchToCheckout) async {
ProcessResult processResult = await git_service.runGit(
['checkout', branchToCheckout],
throwOnError: false,
echoOutput: false,
processWorkingDir: localCheckoutDirectory);
return processResult.exitCode == 0;
}