Home Explore Blog CI



git

1st chunk of `Documentation/config/branch.adoc`
9fee971f48c88ba5fe62b59602674f2cb2d5ad07db782a4300000001000009cf
`branch.autoSetupMerge`::
	Tells `git branch`, `git switch` and `git checkout` to set up new branches
	so that linkgit:git-pull[1] will appropriately merge from the
	starting point branch. Note that even if this option is not set,
	this behavior can be chosen per-branch using the `--track`
	and `--no-track` options.  This option defaults to `true`. The valid settings
	are:
`false`;; no automatic setup is done
`true`;; automatic setup is done when the starting point is a remote-tracking branch
`always`;; automatic setup is done when the starting point is either a
	local branch or remote-tracking branch
`inherit`;; if the starting point has a tracking configuration, it is copied to the new
	branch
`simple`;; automatic setup is done only when the starting point
	is a remote-tracking branch and the new branch has the same name as the
	remote branch.

`branch.autoSetupRebase`::
	When a new branch is created with `git branch`, `git switch` or `git checkout`
	that tracks another branch, this variable tells Git to set
	up pull to rebase instead of merge (see `branch.<name>.rebase`).
	The valid settings are:
`never`;; rebase is never automatically set to true.
`local`;; rebase is set to true for tracked branches of other local branches.
`remote`;; rebase is set to true for tracked branches of remote-tracking branches.
`always`;; rebase will be set to true for all tracking branches.

+
See `branch.autoSetupMerge` for details on how to set up a branch to track another branch.
This option defaults to `never`.

`branch.sort`::
	This variable controls the sort ordering of branches when displayed by
	linkgit:git-branch[1]. Without the `--sort=<value>` option provided, the
	value of this variable will be used as the default.
	See linkgit:git-for-each-ref[1] field names for valid values.

`branch.<name>.remote`::
	When on branch _<name>_, it tells `git fetch` and `git push`
	which remote to fetch from or push to.  The remote to push to
	may be overridden with `remote.pushDefault` (for all branches).
	The remote to push to, for the current branch, may be further
	overridden by `branch.<name>.pushRemote`.  If no remote is
	configured, or if you are not on any branch and there is more than
	one remote defined in the repository, it defaults to `origin` for
	fetching and `remote.pushDefault` for pushing.
	Additionally, `.` (a period) is the current local repository
	(a dot-repository), see `branch.<name>.merge`'s final note below.

`branch.<name>.pushRemote`::
	When on branch _<name>_, it

Title: Git Branch Configuration Options
Summary
This section describes various Git configuration options related to branching, including automatic setup for merging and rebasing, branch sorting, and remote repository settings for fetching and pushing.