Can someone please explain to me why git-checkout is overloaded so that you can get a branch (git checkout master) and also restore a file from the current branch HEAD (git checkout hello.c)? It seems like a misplaced overload. Wouldn’t git-revert be a better overload?
Anways, this confused the hell out of me this morning for some reason.
I think it’d be more confusing if you overloaded revert, since it normally results in a new commit, but checkout doesn’t change your commit tree.
valid. still confusing though.
Yeah I agree. In CVS you do the same thing by removing the file you have edited and running cvs update to grab the latest version. That is a bit more intuitive, since update pulls changes from the main repository into your working directory. I guess in this case it kind of makes sense, as checkout works on your own repository, as opposed to say pull or something.
Anyway, I still find git a bit strange to use, but I like it way more than cvs/svn.