In git, what does the at symbol and curly braces mean?
git reset --soft HEAD@{1}
Likewise, what do double hyphens mean? Not as an option, but as used like so:
git checkout abcd1234 -- .
I'm sure this is referenced somewhere obvious, but I'm having a hard time finding it. Also, searching for non-alphanumeric symbols is difficult.
The at and curly braces are documented in the gitrevisions
manual page.
In your example, it means the prior value of the HEAD
ref - whatever commit HEAD
pointed to before your most recent commit or checkout or whatever.
The double hyphens separate flags from non-flags (usually filenames, but sometimes other things like branch names or remote names). You can use --
to make sure git doesn't treat the argument after the --
as a flag, in case it might look like one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With