Skip to content

Commit 747f9d3

Browse files
committed
Merge branch 'maint-1.6.1' into maint
* maint-1.6.1: Documentation: clarify .gitattributes search git-checkout.txt: clarify that <branch> applies when no path is given. git-checkout.txt: fix incorrect statement about HEAD and index
2 parents 714fddf + aa41cf8 commit 747f9d3

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

Documentation/git-checkout.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,13 @@ the conflicted merge in the specified paths.
127127
<new_branch>::
128128
Name for the new branch.
129129

130+
<tree-ish>::
131+
Tree to checkout from (when paths are given). If not specified,
132+
the index will be used.
133+
130134
<branch>::
131-
Branch to checkout; may be any object ID that resolves to a
132-
commit. Defaults to HEAD.
135+
Branch to checkout (when no paths are given); may be any object
136+
ID that resolves to a commit. Defaults to HEAD.
133137
+
134138
When this parameter names a non-branch (but still a valid commit object),
135139
your HEAD becomes 'detached'.
@@ -191,8 +195,8 @@ $ git checkout hello.c <3>
191195
------------
192196
+
193197
<1> switch branch
194-
<2> take out a file out of other commit
195-
<3> restore hello.c from HEAD of current branch
198+
<2> take a file out of another commit
199+
<3> restore hello.c from the index
196200
+
197201
If you have an unfortunate branch that is named `hello.c`, this
198202
step would be confused as an instruction to switch to that branch.

Documentation/gitattributes.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ same as in `.gitignore` files; see linkgit:gitignore[5].
6060
When deciding what attributes are assigned to a path, git
6161
consults `$GIT_DIR/info/attributes` file (which has the highest
6262
precedence), `.gitattributes` file in the same directory as the
63-
path in question, and its parent directories (the further the
64-
directory that contains `.gitattributes` is from the path in
65-
question, the lower its precedence).
63+
path in question, and its parent directories up to the toplevel of the
64+
work tree (the further the directory that contains `.gitattributes`
65+
is from the path in question, the lower its precedence).
6666

6767
If you wish to affect only a single repository (i.e., to assign
6868
attributes to files that are particular to one user's workflow), then

Documentation/gitignore.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ precedence, the last matching pattern decides the outcome):
3131

3232
* Patterns read from a `.gitignore` file in the same directory
3333
as the path, or in any parent directory, with patterns in the
34-
higher level files (up to the root) being overridden by those in
35-
lower level files down to the directory containing the file.
34+
higher level files (up to the toplevel of the work tree) being overridden
35+
by those in lower level files down to the directory containing the file.
3636
These patterns match relative to the location of the
3737
`.gitignore` file. A project normally includes such
3838
`.gitignore` files in its repository, containing patterns for

0 commit comments

Comments
 (0)