These variables can be set from the transient prefix command
magit-branch-configure
. By default they can also be set from
magit-branch
. See Branch Commands.
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.
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.
This variable controls whether pulling into the branch named NAME is done by rebasing or by merging the fetched branch.
true
then pulling is done by rebasing.
false
then pulling is done by merging.
pull.rebase
is used. The default
of that variable is false
.
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.
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.
This variable specifies whether pulling is done by rebasing or by
merging. It can be overwritten using branch.NAME.rebase
.
true
then pulling is done by rebasing.
false
(the default) then pulling is done by merging.
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
.
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.
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.
always
then the variables are set regardless of whether the
starting point is a local or a remote branch.
true
(the default) then the variables are set when the starting
point is a remote branch, but not when it is a local branch.
false
then the variables are never set.
This variable specifies whether creating a branch NAME should result
in the variable branch.NAME.rebase
being set to true
.
always
then the variable is set regardless of whether the
starting point is a local or a remote branch.
local
then the variable are set when the starting point is a
local branch, but not when it is a remote branch.
remote
then the variable are set when the starting point is a
remote branch, but not when it is a local branch.
never
(the default) then the variable is never set.
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.
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.