git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Doc fix for git-reflog: mention @{...} syntax, and <ref> in synopsys.

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Nov 19, 2007, 18:35 UTC
Message-ID
<1195497342-26334-1-git-send-email-Matthieu.Moy@imag.fr>
In-Reply-To
<vpqtznirtlk.fsf@bauges.imag.fr>

The HEAD@{...} syntax was documented in git-rev-parse manpage, which is hard to find by someone looking for the documentation of porcelain. git-reflog is probably the place where one expects to find this.

While I'm there, "git revlog show whatever" was also undocumented.
---
 Documentation/git-reflog.txt |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-reflog.txt b/Documentation/git-reflog.txt
index 5c7316c..aeac6f0 100644
--- a/Documentation/git-reflog.txt
+++ b/Documentation/git-reflog.txt
@@ -19,7 +19,7 @@ depending on the subcommand:
 git reflog expire [--dry-run] [--stale-fix] [--verbose]
 	[--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>...
 
-git reflog [show] [log-options]
+git reflog [show] [log-options] [<ref>]
 
 Reflog is a mechanism to record when the tip of branches are
 updated.  This command is to manage the information recorded in it.
@@ -32,10 +32,17 @@ directly by the end users -- instead, see gitlink:git-gc[1].
 
 The subcommand "show" (which is also the default, in the absence of any
 subcommands) will take all the normal log options, and show the log of
-`HEAD`, which will cover all recent actions, including branch switches.
+`HEAD`, or of the reference provided in the command-line, which will
+cover all recent actions, including branch switches.
 It is basically an alias for 'git log -g --abbrev-commit
 --pretty=oneline', see gitlink:git-log[1].
 
+The reflog is useful in various git commands, to specify the old value
+of a reference. For example, `HEAD@\{2\}` means "where HEAD used to be
+two moves ago", `master@\{one.week.ago\}` means "where master used to
+point to one week ago", and so on. See gitlink:git-rev-parse[1] for
+more details.
+
 
 OPTIONS
 -------
-- 
1.5.3.5.724.g49d9d
Previous: Matthieu MoyNext: Junio C Hamano
Message 29 of 40 in “Git in a Nutshell guide”
  1. Jonas JuseliusNov 19, 2007
  2. Jakub NarebskiNov 19, 2007
  3. Jonas JuseliusNov 19, 2007
  4. David KågedalNov 22, 2007
  5. Jakub NarebskiNov 23, 2007
  6. Brian DowningNov 19, 2007
  7. Brian DowningNov 19, 2007
  8. Nicolas PitreNov 19, 2007
  9. Jakub NarebskiNov 19, 2007
  10. Jonas JuseliusNov 19, 2007
  11. Benoit SigoureNov 19, 2007
  12. Daniel BarkalowNov 19, 2007
  13. Jonas JuseliusNov 20, 2007
  14. Jakub NarebskiNov 20, 2007
  15. Jan HudecNov 21, 2007
  16. Jakub NarebskiNov 21, 2007
  17. jhud7196@artax.karlin.mff.cuni.czNov 22, 2007
  18. Jonas JuseliusNov 22, 2007
  19. Jonathan del StrotherNov 22, 2007
  20. Johannes SchindelinNov 22, 2007
  21. jhud7196@artax.karlin.mff.cuni.czNov 22, 2007
  22. Lars HjemliNov 19, 2007
  23. Jonas JuseliusNov 19, 2007
  24. Benoit SigoureNov 19, 2007
  25. Lars HjemliNov 19, 2007
  26. Benoit SigoureNov 19, 2007
  27. J. Bruce FieldsNov 19, 2007
  28. Matthieu MoyNov 19, 2007
  29. Doc fix for git-reflog: mention @{...} syntax, and <ref> in synopsys.Matthieu Moy, Nov 19, 2007
  30. Junio C HamanoNov 19, 2007
  31. Doc fix for git-reflog: mention @{...} syntax, and <ref> in synopsys.Matthieu Moy, Nov 19, 2007
  32. Matthieu MoyNov 19, 2007
  33. Benoit SigoureNov 19, 2007
  34. Matthieu MoyNov 19, 2007
  35. Benoit SigoureNov 19, 2007
  36. J. Bruce FieldsNov 19, 2007
  37. Junio C HamanoNov 19, 2007
  38. Matthieu MoyNov 19, 2007
  39. Junio C HamanoNov 19, 2007
  40. Matthieu MoyNov 19, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.