News for hackers. Stuff that matters.
Re:Git your act together by telemachos on Monday August 23, 2010 @05:22PM (#1628104)
I don't always commit as often as I should, but ever since reading Ryan Tomayko's "The thing about git"[1], I use git add --patch/-p to solve the problem of overlarge or mixed commits. It allows you to snip out pieces of the changed files to add, rather than adding the entire file at once. (Perhaps everyone already knows this, but I used git for months without knowing it. So maybe I'll save someone else.)

[1] http://tomayko.com/writings/the-thing-about-git

Re:Git your act together by wonsungi on Monday August 23, 2010 @10:46PM (#1628771)
I agree Tomayko's method is very helpful, but I came to the conclusion it's better to just commit as often as possible.

- Multiple changes that affect the same line(s) are very difficult to pick apart.

- It is easier to write a meaningful commit message while the change is fresh in your head; otherwise a lot of time is spent reviewing your changes.