Function: magit-git-push
magit-git-push is a byte-compiled function defined in magit-push.el.
Signature
(magit-git-push BRANCH TARGET ARGS)
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-push.el
(defun magit-git-push (branch target args)
(run-hooks 'magit-credential-hook)
;; If the remote branch already exists, then we do not have to
;; qualify the target, which we prefer to avoid doing because
;; using the default namespace is wrong in obscure cases.
(pcase-let ((namespace (if (magit-get-tracked target) "" "refs/heads/"))
(`(,remote . ,target)
(magit-split-branch-name target)))
(magit-run-git-async "push" "-v" args remote
(format "%s:%s%s" branch namespace target))))