]> git.ipfire.org Git - thirdparty/git.git/blob - Documentation/config/branch.txt
Merge branch 'en/fetch-negotiation-default-fix'
[thirdparty/git.git] / Documentation / config / branch.txt
1 branch.autoSetupMerge::
2 Tells 'git branch', 'git switch' and 'git checkout' to set up new branches
3 so that linkgit:git-pull[1] will appropriately merge from the
4 starting point branch. Note that even if this option is not set,
5 this behavior can be chosen per-branch using the `--track`
6 and `--no-track` options. The valid settings are: `false` -- no
7 automatic setup is done; `true` -- automatic setup is done when the
8 starting point is a remote-tracking branch; `always` --
9 automatic setup is done when the starting point is either a
10 local branch or remote-tracking branch; `inherit` -- if the starting point
11 has a tracking configuration, it is copied to the new
12 branch. This option defaults to true.
13
14 branch.autoSetupRebase::
15 When a new branch is created with 'git branch', 'git switch' or 'git checkout'
16 that tracks another branch, this variable tells Git to set
17 up pull to rebase instead of merge (see "branch.<name>.rebase").
18 When `never`, rebase is never automatically set to true.
19 When `local`, rebase is set to true for tracked branches of
20 other local branches.
21 When `remote`, rebase is set to true for tracked branches of
22 remote-tracking branches.
23 When `always`, rebase will be set to true for all tracking
24 branches.
25 See "branch.autoSetupMerge" for details on how to set up a
26 branch to track another branch.
27 This option defaults to never.
28
29 branch.sort::
30 This variable controls the sort ordering of branches when displayed by
31 linkgit:git-branch[1]. Without the "--sort=<value>" option provided, the
32 value of this variable will be used as the default.
33 See linkgit:git-for-each-ref[1] field names for valid values.
34
35 branch.<name>.remote::
36 When on branch <name>, it tells 'git fetch' and 'git push'
37 which remote to fetch from/push to. The remote to push to
38 may be overridden with `remote.pushDefault` (for all branches).
39 The remote to push to, for the current branch, may be further
40 overridden by `branch.<name>.pushRemote`. If no remote is
41 configured, or if you are not on any branch, it defaults to
42 `origin` for fetching and `remote.pushDefault` for pushing.
43 Additionally, `.` (a period) is the current local repository
44 (a dot-repository), see `branch.<name>.merge`'s final note below.
45
46 branch.<name>.pushRemote::
47 When on branch <name>, it overrides `branch.<name>.remote` for
48 pushing. It also overrides `remote.pushDefault` for pushing
49 from branch <name>. When you pull from one place (e.g. your
50 upstream) and push to another place (e.g. your own publishing
51 repository), you would want to set `remote.pushDefault` to
52 specify the remote to push to for all branches, and use this
53 option to override it for a specific branch.
54
55 branch.<name>.merge::
56 Defines, together with branch.<name>.remote, the upstream branch
57 for the given branch. It tells 'git fetch'/'git pull'/'git rebase' which
58 branch to merge and can also affect 'git push' (see push.default).
59 When in branch <name>, it tells 'git fetch' the default
60 refspec to be marked for merging in FETCH_HEAD. The value is
61 handled like the remote part of a refspec, and must match a
62 ref which is fetched from the remote given by
63 "branch.<name>.remote".
64 The merge information is used by 'git pull' (which at first calls
65 'git fetch') to lookup the default branch for merging. Without
66 this option, 'git pull' defaults to merge the first refspec fetched.
67 Specify multiple values to get an octopus merge.
68 If you wish to setup 'git pull' so that it merges into <name> from
69 another branch in the local repository, you can point
70 branch.<name>.merge to the desired branch, and use the relative path
71 setting `.` (a period) for branch.<name>.remote.
72
73 branch.<name>.mergeOptions::
74 Sets default options for merging into branch <name>. The syntax and
75 supported options are the same as those of linkgit:git-merge[1], but
76 option values containing whitespace characters are currently not
77 supported.
78
79 branch.<name>.rebase::
80 When true, rebase the branch <name> on top of the fetched branch,
81 instead of merging the default branch from the default remote when
82 "git pull" is run. See "pull.rebase" for doing this in a non
83 branch-specific manner.
84 +
85 When `merges` (or just 'm'), pass the `--rebase-merges` option to 'git rebase'
86 so that the local merge commits are included in the rebase (see
87 linkgit:git-rebase[1] for details).
88 +
89 When the value is `interactive` (or just 'i'), the rebase is run in interactive
90 mode.
91 +
92 *NOTE*: this is a possibly dangerous operation; do *not* use
93 it unless you understand the implications (see linkgit:git-rebase[1]
94 for details).
95
96 branch.<name>.description::
97 Branch description, can be edited with
98 `git branch --edit-description`. Branch description is
99 automatically added in the format-patch cover letter or
100 request-pull summary.