Function: magit-set-upstream-branch
magit-set-upstream-branch is a byte-compiled function defined in
magit-git.el.
Signature
(magit-set-upstream-branch BRANCH UPSTREAM)
Documentation
Set UPSTREAM as the upstream of BRANCH.
If UPSTREAM is nil, then unset BRANCH's upstream. Otherwise UPSTREAM has to be an existing branch.
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-git.el
(defun magit-set-upstream-branch (branch upstream)
"Set UPSTREAM as the upstream of BRANCH.
If UPSTREAM is nil, then unset BRANCH's upstream.
Otherwise UPSTREAM has to be an existing branch."
(if upstream
(magit-call-git "branch" "--set-upstream-to" upstream branch)
(magit-call-git "branch" "--unset-upstream" branch)))