Live data from Hacker News

Git Tutorials for Beginners

sixrevisions.com

21–29 of 29 posts

Re: Git Tutorials for Beginners

#22
post #18

Earlier quoted context omitted.

The overloading of "checkout" to mean revert a file as well as "switch to a different branch" is for me one of the most confusing git design choices.

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.

Re: Git Tutorials for Beginners

#23

A few great resources are missing from that big list at the bottom: Git internals PDF (Scott Chacon) http://peepcode.com/products/git-internals-pdf "Getting Git" screencast (Scott Chacon) http://blip.tv/scott-chacon/git-talk-4113729 Interactive Git cheatsheet (Andrew Peterson, NDP Software) http://www.ndpsoftware.com/git-cheatsheet.html

The best resource for understanding git (or probably bzr/Mercurial) IMO is definitely "The Git Parable" [1]. It takes you through the steps of what you'd do to create a DVCS. This teaches you the concepts, without worrying about the commandline.

Once you understand git, the man pages, docs at kernel.org and cheatsheets are a much easier read. My go-to cheatsheet is now [2], which is actually more of a visualization of commands to use to move between git's different areas.

I must admit, I still need to Google every now and then for things that are counterintuative in git (e.g. removing a submodule) and normally end up on StackOverflow.

[1] http://tom.preston-werner.com/2009/05/19/the-git-parable.htm...

[2] http://ndpsoftware.com/git-cheatsheet.html

Re: Git Tutorials for Beginners

#27
post #18

Earlier quoted context omitted.

The overloading of "checkout" to mean revert a file as well as "switch to a different branch" is for me one of the most confusing git design choices.

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.

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

Re: Git Tutorials for Beginners

#28

A few great resources are missing from that big list at the bottom: Git internals PDF (Scott Chacon) http://peepcode.com/products/git-internals-pdf "Getting Git" screencast (Scott Chacon) http://blip.tv/scott-chacon/git-talk-4113729 Interactive Git cheatsheet (Andrew Peterson, NDP Software) http://www.ndpsoftware.com/git-cheatsheet.html

http://gitref.org ... nice first user overview http://cmurphycode.posterous.com/git-201-slightly-more-advan... ... next one to read http://devcheatsheet.com/tag/git/ ... some visuals
Post reply on HN