Function: magit-push-to-remote

magit-push-to-remote is an autoloaded, interactive and byte-compiled function defined in magit-push.el.

Signature

(magit-push-to-remote ARG1 ARG2)

Documentation

Push to 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 arguments specified in the popup buffer. 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.

You can add this command as a suffix using something like:

  (transient-insert-suffix 'magit-push "o"
    '("x" magit-push-to-remote))

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-push.el
;;;###autoload(autoload 'magit-push-to-remote "magit-push" nil t)
(transient-define-suffix magit-push-to-remote (remote args)
  "Push to 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 arguments specified in the popup buffer.  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'.

You can add this command as a suffix using something like:

  (transient-insert-suffix \\='magit-push \"o\"
    \\='(\"x\" magit-push-to-remote))"
  :description #'magit-push-to-remote--desc
  (interactive (list (magit-read-remote "Push to remote")
                     (magit-push-arguments)))
  (run-hooks 'magit-credential-hook)
  (magit-run-git-async "push" "-v" args remote))