Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do these git symbols mean?

Tags:

git

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.

like image 832
Andrew F Avatar asked Apr 12 '12 21:04

Andrew F


1 Answers

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.

like image 130
rob mayoff Avatar answered Oct 08 '22 14:10

rob mayoff