Re:Simple Revision Control
by digisign on Thursday November 13, 2014 @07:08PM
(#8605027)
I'm liking git for it's internals, but the UI is pretty bad in places:
etc. I look up the git equivs up on stack overflow every time I need them.
[ Parent
| on HN ]
"git checkout -- <file>" does not actually revert a file from the branch. It reverts it from the index. It's only a revert-to-branch operation if you don't have anything in the index. So if you land into one of those "gituations" where use of the index is being foisted upon you, it might not do what you are used to.
There is also the flaw that the -- separator is not required for giving paths: "git checkout <file>" also works. So if you are trying to check out a branch or tag, and make a typo and accidentally type the name of a file which has unstaged changes, you lose them. It doesn't rename the original file to a backup like good old "cvs up -C file".