Hacker News new | past | comments | ask | show | jobs | submit login

1. You're right, it's confusing when coming from a Subversion background. 2. It makes sense when you realize that 'switching to a different branch' and 'reverting a file' are both operations that make your working copy (partly) match a branch, be it a different branch or just your current HEAD. Git is full of stuff like that. Once you get the fundamentals down it all starts to make sense.



It's a poor UI even for people like me who have never used SVN. Understanding how something works after having learned it is not a sign of a good UI, a good UI facilitates easy learning by having commands do the thing you'd expect them to do, so far as that is possible.

The fact that file checkouts and branch creation shares underlying mechanics have nothing to do with the UI, it'd make a lot more sense to create new branches with for instance the git branch command, and checkout files with the git checkout command.

Having said that, I don't think the git UI is horrible at all. I found learning the basics of git rather easy, that doesn't mean the UI can't be improved on further, though.


> 'switching to a different branch' and 'reverting a file' are both operations that make your working copy (partly) match a branch

git revert is the "undo committed change" command.

git reset is the "discard uncommitted change" command (what is called "revert" by Subversion, Mercurial, Perforce, Bazaar, Darcs, Fossil, and SVK).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: