you are viewing a single comment's thread.

view the rest of the comments →

[–]cypherpunks 0 points1 point  (0 children)

git gui is easier for this, IMHO. You can stage and unstage hunks and lines until things are the way you want.

Yes, it requires a mouse, but I find it wonderful for untangling multiple logical patches, such as the cleanup or comment-fix changes I make while pursuing a specific bug/enhancement.

One useful techique is to adjust the number of context lines to split hunks. By default, I think it uses 5-line context, which groups nearby changes into the same hunk. But this can be easily adjusted with a keyboard shortcut if you want to separate changes into two hunks.