Live data from Hacker News

Git add -p: a powerful git feature

johnkary.net

11–20 of 108 posts

Re: Git add -p: a powerful git feature

#13

OT: I'd love an interactive "Learn Git" webpage where you could learn to use Git with demo scenarios. Something like "Try Ruby" but for git.

You didn't look very hard then :] There is a course made by the same people who made Try Ruby, on the same site. It's named, unsurprisingly, 'Try Git':

http://www.codeschool.com/courses/try-git

They also have a second, more advanced course on the site.

Re: Git add -p: a powerful git feature

#17
post #7

Site wont load for me. I'm a big fan of "git gui". You can commit individual lines.

Here's another article discussing git add -p: http://blog.tplus1.com/index.php/2008/10/31/break-up-changes...

Nice. Too bad I'm on svn. Though I suppose you'd want to be really careful about not creating a commit that's broken, e.g. by overlooking a declaration. Can you easily check whether currently staged changes still compile and/or pass a test?

Re: Git add -p: a powerful git feature

#19
post #17
post #7

Site wont load for me. I'm a big fan of "git gui". You can commit individual lines.

Here's another article discussing git add -p: http://blog.tplus1.com/index.php/2008/10/31/break-up-changes... Nice. Too bad I'm on svn. Though I suppose you'd want to be really careful about not creating a commit that's broken, e.g. by overlooking a declaration. Can you easily check whether currently staged changes still compile and/or pass a test?

yes, using the -k option of git stash allow you to 'put away' the changes which are not in the index.

The argument of creating a broken commit is natural, but not very relevant IMO: after all, with svn and co, the risk of forgetting to commit a new file is pretty strong as well. If you care very much about having non-broken commit, the only reliable solution is a gateway that merge commits only after they pass a test suite.

Re: Git add -p: a powerful git feature

#20

OT: I'd love an interactive "Learn Git" webpage where you could learn to use Git with demo scenarios. Something like "Try Ruby" but for git.

All you need to do is type "apt-get install git-core" or "brew install git" and you can try 95% of git out locally. Get a free bitbucket or github account and you can do most of the rest. :)

OK, perhaps you are on Windows, then i am not sure if it's that simple.

Post reply on HN