コード例 #1
0
 /// <summary>
 /// Push a local branch to a remote one, optionally forcing a non-fast-forward commit.
 /// </summary>
 /// <param name="source">Name of the branch to push.</param>
 /// <param name="destination">Ref on the remote side to be updated.</param>
 /// <param name="force">Indicates whether to update the <paramref name="destination"/>
 /// ref even when the update is not a fast-forward.</param>
 public GitPushAction(string?source, string?destination, bool force = false)
 {
     _localBranch  = GitRefName.GetFullBranchName(source);
     _remoteBranch = GitRefName.GetFullBranchName(destination);
     _force        = force;
 }
コード例 #2
0
 /// <summary>Delete a remote branch.</summary>
 /// <param name="branch">Remote branch to delete.</param>
 public static GitPushAction DeleteRemoteBranch(string branch)
 {
     return(new GitPushAction(
                source: null,
                destination: GitRefName.GetFullBranchName(branch)));
 }
コード例 #3
0
 /// <summary>Delete a remote branch.</summary>
 /// <param name="branch">Remote branch to delete.</param>
 public static GitPushAction DeleteRemoteBranch(string branch)
 {
     branch = GitRefName.GetFullBranchName(branch);
     return(new GitPushAction(null, branch));
 }