setBranchUpstreamTo method
Future<BranchConfig>
setBranchUpstreamTo(
- String branchName,
- GitRemoteConfig remote,
- String remoteBranchName
Implementation
Future<BranchConfig> setBranchUpstreamTo(String branchName,
GitRemoteConfig remote, String remoteBranchName) async {
var brConfig = config.branch(branchName);
if (brConfig == null) {
brConfig = BranchConfig(name: branchName);
config.branches[branchName] = brConfig;
}
brConfig.remote = remote.name;
brConfig.merge = ReferenceName.branch(remoteBranchName);
await saveConfig();
return brConfig;
}