Variable: magit-prefer-remote-upstream

magit-prefer-remote-upstream is a customizable variable defined in magit-git.el.

Value

nil

Documentation

Whether to favor remote branches when reading the upstream branch.

This controls whether commands that read a branch from the user and then set it as the upstream branch, offer a local or a remote branch as default completion candidate, when they have the choice.

This affects all commands that use magit-read-upstream-branch or magit-read-starting-point, which includes most commands that change the upstream and many that create new branches.

This variable was added, or its default value changed, in magit version 2.4.2.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-git.el
(defcustom magit-prefer-remote-upstream nil
  "Whether to favor remote branches when reading the upstream branch.

This controls whether commands that read a branch from the user
and then set it as the upstream branch, offer a local or a remote
branch as default completion candidate, when they have the choice.

This affects all commands that use `magit-read-upstream-branch'
or `magit-read-starting-point', which includes most commands
that change the upstream and many that create new branches."
  :package-version '(magit . "2.4.2")
  :group 'magit-commands
  :type 'boolean)