Function: magit-set-upstream-branch
magit-set-upstream-branch is a natively 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 /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/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)))