If you ignore the staging area, you become much more tempted to make several unrelated changes in one commit, rather than untangling them.
If you ignore the staging area, you become much more tempted to make several unrelated changes in one commit, rather than untangling them.
The git UI has some warts, but the staging area isn't one of them. It's an extremely useful feature, and a true improvement over traditional SCM interfaces.
It's nice to see people wanting to improve git's interface, but please, don't just dumb it down....
git add -p doesn't help tease them apart, because its hunks are based on diffs, and the granularity usually does not coincide with actual changes (nor syntax or semantics of the languages). Which is really expecting a bit too much! Diff's implementation of LCS algorithm is incredibly fast and works amazingly well for changes in different places.
So what I do is edit the file to what I want, stage and commit, then undo and continue. This doesn't really use the staging area, and I'm hoping there's a better way to do it... if anyone can think of one?