Skip to content

Commit 95f9be5

Browse files
tacker66gitster
authored andcommitted
Use current "detached HEAD" message
Signed-off-by: Thomas Ackermann <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 333d7d3 commit 95f9be5

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

Documentation/user-manual.txt

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,17 @@ referenced by a tag:
312312

313313
------------------------------------------------
314314
$ git checkout v2.6.17
315-
Note: moving to "v2.6.17" which isn't a local branch
316-
If you want to create a new branch from this checkout, you may do so
317-
(now or later) by using -b with the checkout command again. Example:
318-
git checkout -b <new_branch_name>
315+
Note: checking out 'v2.6.17'.
316+
317+
You are in 'detached HEAD' state. You can look around, make experimental
318+
changes and commit them, and you can discard any commits you make in this
319+
state without impacting any branches by performing another checkout.
320+
321+
If you want to create a new branch to retain commits you create, you may
322+
do so (now or later) by using -b with the checkout command again. Example:
323+
324+
git checkout -b new_branch_name
325+
319326
HEAD is now at 427abfa... Linux v2.6.17
320327
------------------------------------------------
321328

@@ -326,7 +333,7 @@ and git branch shows that you are no longer on a branch:
326333
$ cat .git/HEAD
327334
427abfa28afedffadfca9dd8b067eb6d36bac53f
328335
$ git branch
329-
* (no branch)
336+
* (detached from v2.6.17)
330337
master
331338
------------------------------------------------
332339

@@ -3639,7 +3646,7 @@ working on a branch.
36393646

36403647
-------------------------------------------------
36413648
$ git branch
3642-
* (no branch)
3649+
* (detached from d266b98)
36433650
master
36443651
-------------------------------------------------
36453652

0 commit comments

Comments
 (0)