doc: documentation update for the branch track changes
Documents the branch.autosetupmerge=always setting and usage of --track when branching from a local branch. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jay Soffian committed
Feb 19, 2008 at 11:24 UTC
572fc81d21b26d856dd3c2cc366b7452a4ed16e4
3 files changed
+34
-32
Documentation/config.txt
+7
-3
@@ -330,10 +330,14 @@ apply.whitespace::
330
331
branch.autosetupmerge::
332
Tells `git-branch` and `git-checkout` to setup new branches
333
- so that linkgit:git-pull[1] will appropriately merge from that
334
- remote branch. Note that even if this option is not set,
333
+ so that linkgit:git-pull[1] will appropriately merge from the
334
+ starting point branch. Note that even if this option is not set,
335
this behavior can be chosen per-branch using the `--track`
336
- and `--no-track` options. This option defaults to false.
336
+ and `--no-track` options. The valid settings are: `false` -- no
337
+ automatic setup is done; `true` -- automatic setup is done when the
338
+ starting point is a remote branch; `always` -- automatic setup is
339
+ done when the starting point is either a local branch or remote
340
+ branch. This option defaults to true.
341
342
branch.<name>.remote::
343
When in branch <name>, it tells `git fetch` which remote to fetch.
Documentation/git-branch.txt
+16
-17
@@ -34,12 +34,11 @@ Note that this will create the new branch, but it will not switch the
34
working tree to it; use "git checkout <newbranch>" to switch to the
35
new branch.
36
37
-When a local branch is started off a remote branch, git can setup the
38
-branch so that linkgit:git-pull[1] will appropriately merge from that
39
-remote branch. If this behavior is desired, it is possible to make it
40
-the default using the global `branch.autosetupmerge` configuration
41
-flag. Otherwise, it can be chosen per-branch using the `--track`
42
-and `--no-track` options.
37
+When a local branch is started off a remote branch, git sets up the
38
+branch so that linkgit:git-pull[1] will appropriately merge from
39
+the remote branch. This behavior may be changed via the global
40
+`branch.autosetupmerge` configuration flag. That setting can be
41
+overridden by using the `--track` and `--no-track` options.
42
43
With a '-m' or '-M' option, <oldbranch> will be renamed to <newbranch>.
44
If <oldbranch> had a corresponding reflog, it is renamed to match
@@ -105,19 +104,19 @@ OPTIONS
104
Display the full sha1s in output listing rather than abbreviating them.
105
106
--track::
108
- Set up configuration so that git-pull will automatically
109
- retrieve data from the remote branch. Use this if you always
110
- pull from the same remote branch into the new branch, or if you
111
- don't want to use "git pull <repository> <refspec>" explicitly. Set the
112
- branch.autosetupmerge configuration variable to true if you
113
- want git-checkout and git-branch to always behave as if
114
- '--track' were given.
107
+ When creating a new branch, set up configuration so that git-pull
108
+ will automatically retrieve data from the start point, which must be
109
+ a branch. Use this if you always pull from the same upstream branch
110
+ into the new branch, and if you don't want to use "git pull
111
+ <repository> <refspec>" explicitly. This behavior is the default
112
+ when the start point is a remote branch. Set the
113
+ branch.autosetupmerge configuration variable to `false` if you want
114
+ git-checkout and git-branch to always behave as if '--no-track' were
115
+ given. Set it to `always` if you want this behavior when the
116
+ start-point is either a local or remote branch.
117
118
--no-track::
117
- When a branch is created off a remote branch,
118
- set up configuration so that git-pull will not retrieve data
119
- from the remote branch, ignoring the branch.autosetupmerge
120
- configuration variable.
119
+ Ignore the branch.autosetupmerge configuration variable.
120
121
<branchname>::
122
The name of the branch to create or delete.
Documentation/git-checkout.txt
+11
-12
@@ -48,20 +48,19 @@ OPTIONS
48
may restrict the characters allowed in a branch name.
49
50
--track::
51
- When -b is given and a branch is created off a remote branch,
52
- set up configuration so that git-pull will automatically
53
- retrieve data from the remote branch. Use this if you always
54
- pull from the same remote branch into the new branch, or if you
55
- don't want to use "git pull <repository> <refspec>" explicitly. Set the
56
- branch.autosetupmerge configuration variable to true if you
57
- want git-checkout and git-branch to always behave as if
58
- '--track' were given.
51
+ When creating a new branch, set up configuration so that git-pull
52
+ will automatically retrieve data from the start point, which must be
53
+ a branch. Use this if you always pull from the same upstream branch
54
+ into the new branch, and if you don't want to use "git pull
55
+ <repository> <refspec>" explicitly. This behavior is the default
56
+ when the start point is a remote branch. Set the
57
+ branch.autosetupmerge configuration variable to `false` if you want
58
+ git-checkout and git-branch to always behave as if '--no-track' were
59
+ given. Set it to `always` if you want this behavior when the
60
+ start-point is either a local or remote branch.
61
62
--no-track::
61
- When -b is given and a branch is created off a remote branch,
62
- set up configuration so that git-pull will not retrieve data
63
- from the remote branch, ignoring the branch.autosetupmerge
64
- configuration variable.
63
+ Ignore the branch.autosetupmerge configuration variable.
64
65
-l::
66
Create the new branch's reflog. This activates recording of