|
|
|
|
|
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. |
|
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.