1

I noticed that the @, ~, and ^ sign can be combined with many things, like HEAD, sha-1, branch names and tags. I also found that @{number} can be used alone without being prefixed by HEAD. HEAD@{number} is used to display an entry in the shortlog. It seems that @{number} means the same thing, but I cannot find occurrences of @{number} in the docs.

  • Is @{number} as strict synonym of HEAD@{number}?
  • Is there other kind of things that can be combined with those sigils?
  • Is this documented somewhere?

Relevant links:

Robin
  • 423
  • 3
  • 10
  • 2
    Does this answer your question? [What does the "at" @ sign/symbol/character mean in Git?](https://stackoverflow.com/questions/17910096/what-does-the-at-sign-symbol-character-mean-in-git) – Orace Jan 26 '22 at 09:02
  • Yes, it does, thanks! – Robin Feb 14 '22 at 14:07

1 Answers1

2

From the doc :

@{<n>}, e.g. @{1}
You can use the @ construct with an empty ref part to get at a reflog entry of the current branch. For example, if you are on branch blabla then @{1} means the same as blabla@{1}.

(But this whole revisions page is going through a lot of other syntaxes, be sure to scroll through them, it's a treasure trove!)

Romain Valeri
  • 19,645
  • 3
  • 36
  • 61
  • 1
    Thanks, it’s what I was searching for. I didn’t realized that there is both https://git-scm.com/book and https://git-scm.com/docs. – Robin Feb 14 '22 at 14:08