pushLocalChangesUpstream function
Adds and pushes local changes and creates an upstream branch.
Implementation
Future<void> pushLocalChangesUpstream(Directory d, String branch) async {
// Add local changes
final result0 = await ggRunProcess('git', [
'add',
'.',
], workingDirectory: d.path);
_throw('Could not add local changes', result0);
// Push and create upstream
final result1 = await ggRunProcess('git', [
'push',
'-u',
'origin',
branch,
], workingDirectory: d.path);
_throw('Could not push local changes with upstream', result1);
}