From: "J. Bruce Fields" <bfields@citi.umich.edu>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org, "J. Bruce Fields" <bfields@citi.umich.edu>,
Nicolas Pitre <nico@cam.org>
Subject: [PATCH 1/6] user-manual: more discussion of detached heads, fix typos
Date: Mon, 7 May 2007 01:13:57 -0400 [thread overview]
Message-ID: <36724.5747046129$1178514857@news.gmane.org> (raw)
In-Reply-To: <11785148422793-git-send-email->
From: J. Bruce Fields <bfields@citi.umich.edu>
Nicolas Pitre pointed out a couple typos and some room for improvement
in the discussion of detached heads.
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Cc: Nicolas Pitre <nico@cam.org>
---
Documentation/user-manual.txt | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index dff438f..54fd413 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -527,17 +527,16 @@ and git branch shows that you are no longer on a branch:
------------------------------------------------
$ cat .git/HEAD
427abfa28afedffadfca9dd8b067eb6d36bac53f
-git branch
+$ git branch
* (no branch)
master
------------------------------------------------
In this case we say that the HEAD is "detached".
-This can be an easy way to check out a particular version without having
-to make up a name for a new branch. However, keep in mind that when you
-switch away from the (for example, by checking out something else), you
-can lose track of what the HEAD used to point to.
+This is an easy way to check out a particular version without having to
+make up a name for the new branch. You can still create a new branch
+(or tag) for this version later if you decide to.
Examining branches from a remote repository
-------------------------------------------
@@ -1560,8 +1559,19 @@ $ git show master@{2} # See where the branch pointed 2,
$ git show master@{3} # 3, ... changes ago.
$ gitk master@{yesterday} # See where it pointed yesterday,
$ gitk master@{"1 week ago"} # ... or last week
+$ git log --walk-reflogs master # show reflog entries for master
+-------------------------------------------------
+
+A separate reflog is kept for the HEAD, so
+
+-------------------------------------------------
+$ git show HEAD@{"1 week ago"}
-------------------------------------------------
+will show what HEAD pointed to one week ago, not what the current branch
+pointed to one week ago. This allows you to see the history of what
+you've checked out.
+
The reflogs are kept by default for 30 days, after which they may be
pruned. See gitlink:git-reflog[1] and gitlink:git-gc[1] to learn
how to control this pruning, and see the "SPECIFYING REVISIONS"
--
1.5.1.1.98.gedb4f
next parent reply other threads:[~2007-05-07 5:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <11785148422793-git-send-email->
2007-05-07 5:13 ` J. Bruce Fields [this message]
[not found] ` <11785148433801-git-send-email->
2007-05-07 5:13 ` [PATCH 2/6] user-manual: add section ID's J. Bruce Fields
[not found] ` <11785148442263-git-send-email->
2007-05-07 5:13 ` [PATCH 3/6] user-manual: clean up fast-forward and dangling-objects sections J. Bruce Fields
[not found] ` <1178514845119-git-send-email->
2007-05-07 5:14 ` [PATCH 4/6] user-manual: fix .gitconfig editing examples J. Bruce Fields
[not found] ` <11785148452962-git-send-email->
2007-05-07 5:14 ` [PATCH 5/6] user-manual: miscellaneous editing J. Bruce Fields
[not found] ` <11785148461307-git-send-email->
2007-05-07 5:14 ` [PATCH 6/6] user-manual: stop deprecating the manual J. Bruce Fields
[not found] ` <11785148472393-git-send-email->
2007-05-07 10:57 ` Johannes Schindelin
2007-05-07 19:19 ` Junio C Hamano
2007-05-08 2:49 ` J. Bruce Fields
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='36724.5747046129$1178514857@news.gmane.org' \
--to=bfields@citi.umich.edu \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=nico@cam.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox