Re:A Git catastrophe cleaned up
by hyperpape on Wednesday December 21, 2016 @12:18PM
(#13230782)
Version control is complicated, but git adds a whole nother layer of bullshit on top of it. Why do you use checkout to change a branch, create a branch and revert a file? Not because version control is hard, but because as a CLI, git does many things wrong (example from http://stevelosh.com/blog/2013/04/git-koans/).
[ Parent
| on HN ]
> Why do you use checkout to change a branch, create a branch and revert a file
git checkout lets you check out files from a particular point in time. If you don't specify a path, it will check out every file. If you don't specify a point in time, it defaults to HEAD (like every git command). I fail to see what is confusing about that. You're not "reverting" changes to a file, you're just checking out a version of the file from the history.
`git checkout -b` is shorthand, and is shorthand that I personally don't use.