Hacker News new | ask | show | jobs
by kevin_thibedeau 1732 days ago
Git checkout is overloaded with too many behaviors. If it was naturally intuitive they wouldn't have needed to add the restore command. A better comparison would be Mercurial which has a much more coherent command interface.
1 comments

Given the widespread use of git now, it's probably the first VCS that people are exposed to. But, for several years after it was released, it was the first distributed VCS that people used (if they hadn't had a chance to work with other DVSs like mercurial or bazaar). So, it's likely most people at that time were used to using svn or cvs.

As for overloading the checkout command, the git man page lists the following

1. checkout a branch

2. checkout and create a new branch (combining git checkout and git branch)

3. checkout a path at a certain commit

In contrast, the svn co/checkout command has the following options

1. Checkout a directory

2. Checkout a file

3. Checkout a directory or file at a certain revision

Which really isn't that different. Given svn's concept of branches really being copies of the repository, one would switch branches by just checking out a different branch by using the switch command. In this case, I think git's interface is better since you don't need a different command to just change between branches.