Use "e" (like "edit") when asked whether you want to stage a hunk and remove the new lines you don't want to stage and add the old lines that you don't want removed in that commit.
Any + line can be removed or moved anywhere else in the hunk.
Any - line can be changed to a [] line.
Most [] lines can be changed to - lines. [] lines supply the context Git needs to apply patches, and a missing or non-existent [] are often the cause of a patch failure.
This works without touching the patch line numbers at all.
10
u/[deleted] Feb 06 '15
Use "e" (like "edit") when asked whether you want to stage a hunk and remove the new lines you don't want to stage and add the old lines that you don't want removed in that commit.