I found this command from here
git check out oneThing anotherThing
oneThing is commit hash
anotherThing is .
What does it do exactly?
It is unclear after reading official doc here.
I found this command from here
git check out oneThing anotherThing
oneThing is commit hash
anotherThing is .
What does it do exactly?
It is unclear after reading official doc here.
It is the option git checkout [-p|--patch] [<tree-ish>] [--] <pathspec>…
from the documentation. Your anotherThing (.
) is just referencing to the current folder.
So what the command does:
git checkout with or --patch is used to restore modified or deleted paths to their original contents from the index or replace paths with the contents from a named (most often a commit-ish).