Function: magit-push-other

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

Signature

(magit-push-other SOURCE TARGET ARGS)

Documentation

Push an arbitrary branch or commit somewhere.

Both the source and the target are read in the minibuffer.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-push.el
;;;###autoload
(defun magit-push-other (source target args)
  "Push an arbitrary branch or commit somewhere.
Both the source and the target are read in the minibuffer."
  (interactive
    (let ((source (magit-read-local-branch-or-commit "Push")))
      (list source
            (magit-read-remote-branch
             (format "Push %s to" source) nil
             (cond ((magit-local-branch-p source)
                    (or (magit-get-push-branch source)
                        (magit-get-upstream-branch source)))
                   ((magit-rev-ancestor-p source "HEAD")
                    (or (magit-get-push-branch)
                        (magit-get-upstream-branch))))
             source 'confirm)
            (magit-push-arguments))))
  (magit-git-push source target args))