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>
This commit is contained in:
Jay Soffian
2008-02-19 11:24:38 -05:00
committed by Junio C Hamano
parent 9ed36cfa35
commit 572fc81d21
3 changed files with 34 additions and 32 deletions

View File

@ -330,10 +330,14 @@ apply.whitespace::
branch.autosetupmerge:: branch.autosetupmerge::
Tells `git-branch` and `git-checkout` to setup new branches Tells `git-branch` and `git-checkout` to setup new branches
so that linkgit:git-pull[1] will appropriately merge from that so that linkgit:git-pull[1] will appropriately merge from the
remote branch. Note that even if this option is not set, starting point branch. Note that even if this option is not set,
this behavior can be chosen per-branch using the `--track` this behavior can be chosen per-branch using the `--track`
and `--no-track` options. This option defaults to false. and `--no-track` options. The valid settings are: `false` -- no
automatic setup is done; `true` -- automatic setup is done when the
starting point is a remote branch; `always` -- automatic setup is
done when the starting point is either a local branch or remote
branch. This option defaults to true.
branch.<name>.remote:: branch.<name>.remote::
When in branch <name>, it tells `git fetch` which remote to fetch. When in branch <name>, it tells `git fetch` which remote to fetch.

View File

@ -34,12 +34,11 @@ Note that this will create the new branch, but it will not switch the
working tree to it; use "git checkout <newbranch>" to switch to the working tree to it; use "git checkout <newbranch>" to switch to the
new branch. new branch.
When a local branch is started off a remote branch, git can setup the When a local branch is started off a remote branch, git sets up the
branch so that linkgit:git-pull[1] will appropriately merge from that branch so that linkgit:git-pull[1] will appropriately merge from
remote branch. If this behavior is desired, it is possible to make it the remote branch. This behavior may be changed via the global
the default using the global `branch.autosetupmerge` configuration `branch.autosetupmerge` configuration flag. That setting can be
flag. Otherwise, it can be chosen per-branch using the `--track` overridden by using the `--track` and `--no-track` options.
and `--no-track` options.
With a '-m' or '-M' option, <oldbranch> will be renamed to <newbranch>. With a '-m' or '-M' option, <oldbranch> will be renamed to <newbranch>.
If <oldbranch> had a corresponding reflog, it is renamed to match If <oldbranch> had a corresponding reflog, it is renamed to match
@ -105,19 +104,19 @@ OPTIONS
Display the full sha1s in output listing rather than abbreviating them. Display the full sha1s in output listing rather than abbreviating them.
--track:: --track::
Set up configuration so that git-pull will automatically When creating a new branch, set up configuration so that git-pull
retrieve data from the remote branch. Use this if you always will automatically retrieve data from the start point, which must be
pull from the same remote branch into the new branch, or if you a branch. Use this if you always pull from the same upstream branch
don't want to use "git pull <repository> <refspec>" explicitly. Set the into the new branch, and if you don't want to use "git pull
branch.autosetupmerge configuration variable to true if you <repository> <refspec>" explicitly. This behavior is the default
want git-checkout and git-branch to always behave as if when the start point is a remote branch. Set the
'--track' were given. branch.autosetupmerge configuration variable to `false` if you want
git-checkout and git-branch to always behave as if '--no-track' were
given. Set it to `always` if you want this behavior when the
start-point is either a local or remote branch.
--no-track:: --no-track::
When a branch is created off a remote branch, Ignore the branch.autosetupmerge configuration variable.
set up configuration so that git-pull will not retrieve data
from the remote branch, ignoring the branch.autosetupmerge
configuration variable.
<branchname>:: <branchname>::
The name of the branch to create or delete. The name of the branch to create or delete.

View File

@ -48,20 +48,19 @@ OPTIONS
may restrict the characters allowed in a branch name. may restrict the characters allowed in a branch name.
--track:: --track::
When -b is given and a branch is created off a remote branch, When creating a new branch, set up configuration so that git-pull
set up configuration so that git-pull will automatically will automatically retrieve data from the start point, which must be
retrieve data from the remote branch. Use this if you always a branch. Use this if you always pull from the same upstream branch
pull from the same remote branch into the new branch, or if you into the new branch, and if you don't want to use "git pull
don't want to use "git pull <repository> <refspec>" explicitly. Set the <repository> <refspec>" explicitly. This behavior is the default
branch.autosetupmerge configuration variable to true if you when the start point is a remote branch. Set the
want git-checkout and git-branch to always behave as if branch.autosetupmerge configuration variable to `false` if you want
'--track' were given. git-checkout and git-branch to always behave as if '--no-track' were
given. Set it to `always` if you want this behavior when the
start-point is either a local or remote branch.
--no-track:: --no-track::
When -b is given and a branch is created off a remote branch, Ignore the branch.autosetupmerge configuration variable.
set up configuration so that git-pull will not retrieve data
from the remote branch, ignoring the branch.autosetupmerge
configuration variable.
-l:: -l::
Create the new branch's reflog. This activates recording of Create the new branch's reflog. This activates recording of