/// <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; }
/// <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))); }
/// <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)); }