by soupshield · 4y ago · 0 comments
git checkout HEAD -- <filename>
I find it hard to remember things unless I understand their purpose. It looks like it's specifying an argument but without an argument name (e.g. --verbose), unless it's similar to a pipe | symbol and <filename> is being passed to the checkout command as some special kind of argument?https://unix.stackexchange.com/questions/11376/what-does-dou...
This is not git specific, but a common convention for CLI tools. Try running:
> touch -- -i foo
> rm -- -i foo
And compare what happens without the "--". startx /path/to/client --with --client-options and arguments -- --server-options -go --here
Here, the double dash is used to separate the client options from the server options (the path to the server binary is compiled-in, IIRC).docker run -it nginx —- ls la