discontinuedPackage git_assistant has been discontinued.

setUpstreamOpt method

PushGitChain setUpstreamOpt({
  1. String? remote,
  2. String? refspec,
})

Generates --set-upstream option.

Adds 'remote refspec' if both remote and refspec are provided.

Implementation

PushGitChain setUpstreamOpt({String? remote, String? refspec}) {
  if (remote != null && refspec != null) {
    return _createPushOption('--set-upstream $remote $refspec');
  }
  return _createPushOption('--set-upstream');
}