Next: , Previous: , Up: Branching   [Contents][Index]


6.5.3 The Branch Config Popup

Command: magit-branch-config-popup

This prefix command shows the following branch-related Git variables in a popup buffer. The values can be changed from that buffer.

This popup is a sub-popup of several popups that deal with branches, including magit-branch-popup, magit-pull-popup, magit-fetch-popup, magit-pull-and-fetch-popup, and magit-push-popup. In all of these popups "C" is bound to this popup.

The following variables are used to configure a specific branch. The values are being displayed for the current branch (if any). To change the value for another branch invoke magit-branch-config-popup with a prefix argument.

Variable: branch.NAME.merge

Together with branch.NAME.remote this variable defines the upstream branch of the local branch named NAME. The value of this variable is the full reference of the upstream branch.

Variable: branch.NAME.remote

Together with branch.NAME.merge this variable defines the upstream branch of the local branch named NAME. The value of this variable is the name of the upstream remote.

Variable: branch.NAME.rebase

This variable controls whether pulling into the branch named NAME is done by rebasing or by merging the fetched branch.

Variable: branch.NAME.pushRemote

This variable specifies the remote that the branch named NAME is usually pushed to. The value has to be the name of an existing remote.

It is not possible to specify the name of branch to push the local branch to. The name of the remote branch is always the same as the name of the local branch.

If this variable is undefined but remote.pushDefault is defined, then the value of the latter is used. By default remote.pushDefault is undefined.

Variable: branch.NAME.description

This variable can be used to describe the branch named NAME. That description is used e.g. when turning the branch into a series of patches.

The following variables specify defaults which are used if the above branch-specific variables are not set.

Variable: pull.rebase

This variable specifies whether pulling is done by rebasing or by merging. It can be overwritten using branch.NAME.rebase.

Since it is never a good idea to merge the upstream branch into a feature or hotfix branch and most branches are such branches, you should consider setting this to true, and branch.master.rebase to false.

Variable: remote.pushDefault

This variable specifies what remote the local branches are usually pushed to. This can be overwritten per branch using branch.NAME.pushRemote.

The following variables are used during the creation of a branch and control whether the various branch-specific variables are automatically set at this time.

Variable: branch.autoSetupMerge

This variable specifies under what circumstances creating a branch NAME should result in the variables branch.NAME.merge and branch.NAME.remote being set according to the starting point used to create the branch. If the starting point isn’t a branch, then these variables are never set.

Variable: branch.autoSetupRebase

This variable specifies whether creating a branch NAME should result in the variable branch.NAME.rebase being set to true.

Note that the respective commands always change the repository-local values. If you want to change the global value, which is used when the local value is undefined, then you have to do so on the command line, e.g.:

git config --global remote.autoSetupMerge always

For more information about these variables you should also see

the git-config(1) manpage.

Also see the git-branch(1) manpage. , the git-checkout(1) manpage. and Pushing.

User Option: magit-prefer-remote-upstream

This option 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 all commands that change the upstream and many which create new branches.


Next: , Previous: , Up: Branching   [Contents][Index]