diff options
author | Junio C Hamano <junio@hera.kernel.org> | 2008-08-20 09:14:14 +0000 |
---|---|---|
committer | Junio C Hamano <junio@hera.kernel.org> | 2008-08-20 09:14:14 +0000 |
commit | 5cf43cab94d19dce9d3c883f374e254c7b2572e1 (patch) | |
tree | 25eec20f3b813fbff31d880a8b930447541ecaae /git-checkout.txt | |
parent | 7c2d9ea271ffc94f8b7e907b3ec88c2fdfb462f2 (diff) | |
download | git-htmldocs-5cf43cab94d19dce9d3c883f374e254c7b2572e1.tar.gz |
Autogenerated HTML docs for v1.6.0-36-g3814c
Diffstat (limited to 'git-checkout.txt')
-rw-r--r-- | git-checkout.txt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/git-checkout.txt b/git-checkout.txt index 5aa69c0e1..43d450254 100644 --- a/git-checkout.txt +++ b/git-checkout.txt @@ -8,7 +8,7 @@ git-checkout - Checkout a branch or paths to the working tree SYNOPSIS -------- [verse] -'git checkout' [-q] [-f] [[--track | --no-track] -b <new_branch> [-l]] [-m] [<branch>] +'git checkout' [-q] [-f] [--track | --no-track] [-b <new_branch> [-l]] [-m] [<branch>] 'git checkout' [<tree-ish>] [--] <paths>... DESCRIPTION @@ -21,6 +21,10 @@ specified, <new_branch>. Using -b will cause <new_branch> to be created; in this case you can use the --track or --no-track options, which will be passed to `git branch`. +As a convenience, --track will default to create a branch whose +name is constructed from the specified branch name by stripping +the first namespace level. + When <paths> are given, this command does *not* switch branches. It updates the named paths in the working tree from the index file (i.e. it runs `git checkout-index -f -u`), or @@ -59,6 +63,10 @@ OPTIONS '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. ++ +If no '-b' option was given, a name will be made up for you, by stripping +the part up to the first slash of the tracked branch. For example, if you +called 'git checkout --track origin/next', the branch name will be 'next'. --no-track:: Ignore the branch.autosetupmerge configuration variable. |