Next: , Previous: , Up: Transferring   [Contents][Index]


7.4 Pushing

Also see the git-push(1) manpage. For information about the upstream and the push-remote, see The Two Remotes.

P     (magit-push)

This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked.

P p     (magit-push-current-to-pushremote)

This command pushes the current branch to its push-remote.

When magit-remote-set-if-missing is non-nil and the push-remote is not configured, then configure it before pushing. With a prefix argument let the user change the push-remote before pushing to it.

P u     (magit-push-current-to-upstream)

This command pushes the current branch to its upstream branch.

When magit-remote-set-if-missing is non-nil and the upstream is not configured, then configure it before pushing. With a prefix argument let the user change the upstream before pushing to it.

P e     (magit-push-current)

This command pushes the current branch to a branch read in the minibuffer.

P o     (magit-push-other)

This command pushes an arbitrary branch or commit somewhere. Both the source and the target are read in the minibuffer.

P r     (magit-push-refspecs)

This command pushes one or multiple refspecs to a remote, both of which are read in the minibuffer.

To use multiple refspecs, separate them with commas. Completion is only available for the part before the colon, or when no colon is used.

P m     (magit-push-matching)

This command pushes all matching branches to another repository.

If only one remote exists, then push to that. Otherwise prompt for a remote, offering the remote configured for the current branch as default.

P t     (magit-push-tags)

This command pushes all tags to another repository.

If only one remote exists, then push to that. Otherwise prompt for a remote, offering the remote configured for the current branch as default.

P T     (magit-push-tag)

This command pushes a tag to another repository.

Two more push commands exist, which by default are not available from the push transient. See their doc-strings for instructions on how to add them to the transient.

Command: magit-push-implicitly args

This command pushes somewhere without using an explicit refspec.

This command simply runs git push -v [ARGS]. ARGS are the infix arguments. No explicit refspec arguments are used. Instead the behavior depends on at least these Git variables: push.default, remote.pushDefault, branch.<branch>.pushRemote, branch.<branch>.remote, branch.<branch>.merge, and remote.<remote>.push.

Command: magit-push-to-remote remote args

This command pushes to the remote REMOTE without using an explicit refspec. The remote is read in the minibuffer.

This command simply runs git push -v [ARGS] REMOTE. ARGS are the infix arguments. No refspec arguments are used. Instead the behavior depends on at least these Git variables: push.default, remote.pushDefault, branch.<branch>.pushRemote, branch.<branch>.remote, branch.<branch>.merge, and remote.<remote>.push.


Next: , Previous: , Up: Transferring   [Contents][Index]