Reputation: 13205
If I want to replace a folder on a working branch with the same folder from another branch, I can call:
git checkout OTHER_BRANCH -- /path/to/folder
what is the meaning of the -- ?
Upvotes: 5
Views: 758
Reputation: 265956
Everything after --
is considered a file name. This is useful in at least two cases:
git checkout foo --
and git checkout -- foo
git checkout -- -f
(alternatively: git checkout ./-f
Upvotes: 10