8
SYNOPSIS
9
--------
10
[verse]
11
-'git checkout' [-q] [-f] [-t | --track | --no-track] [-b <new_branch> [-l]] [-m] [<branch>]
11
+'git checkout' [-q] [-f] [-m] [-b <new_branch>] [<branch>]
12
'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>...
13
14
DESCRIPTION
18
updating the index and working tree to reflect the specified
19
branch, <branch>, and updating HEAD to be <branch> or, if
20
specified, <new_branch>. Using -b will cause <new_branch> to
21
-be created; in this case you can use the --track or --no-track
22
-options, which will be passed to `git branch`.
21
+be created as if linkgit:git-branch[1] were called; in this case you can
22
+use the --track or --no-track options, which will be passed to `git
23
+branch`.
24
25
As a convenience, --track will default to creating a branch whose
26
name is constructed from the specified branch name by stripping
63
64
-b::
65
Create a new branch named <new_branch> and start it at
65
- <branch>. The new branch name must pass all checks defined
66
- by linkgit:git-check-ref-format[1]. Some of these checks
67
- may restrict the characters allowed in a branch name.
66
+ <branch>; see linkgit:git-branch[1] for details.
67
68
-t::
69
--track::
71
- When creating a new branch, set up configuration so that 'git-pull'
72
- will automatically retrieve data from the start point, which must be
73
- a branch. Use this if you always pull from the same upstream branch
74
- into the new branch, and if you don't want to use "git pull
75
- <repository> <refspec>" explicitly. This behavior is the default
76
- when the start point is a remote branch. Set the
77
- branch.autosetupmerge configuration variable to `false` if you want
78
- 'git checkout' and 'git branch' to always behave as if '--no-track' were
79
- given. Set it to `always` if you want this behavior when the
80
- start point is either a local or remote branch.
70
+ When creating a new branch, set up "upstream" configuration. See
71
+ "--track" in linkgit:git-branch[1] for details.
72
+
73
If no '-b' option is given, the name of the new branch will be
74
derived from the remote branch. If "remotes/" or "refs/remotes/"
85
branch.autosetupmerge configuration variable is true.
86
87
-l::
97
- Create the new branch's reflog. This activates recording of
98
- all changes made to the branch ref, enabling use of date
99
- based sha1 expressions such as "<branchname>@\{yesterday}".
88
+ Create the new branch's reflog; see linkgit:git-branch[1] for
89
+ details.
90
91
-m::
92
--merge::