git hunk edit mode - how to remove a '-' line?

Lai Yu-Hsuan picture Lai Yu-Hsuan · May 24, 2012 · Viewed 8.7k times · Source
+ bbb
- aaa

# ---
# To remove '-' lines, make them ' ' lines (context).
# To remove '+' lines, delete them.
# Lines starting with # will be removed.
#
# If the patch applies cleanly, the edited hunk will immediately be
# marked for staging. If it does not apply cleanly, you will be given
# an opportunity to edit again. If all lines of the hunk are removed,
# then the edit is aborted and the hunk is left unchanged.

I simply don't understand what make them ' ' lines means. How to apply + bbb only but not - aaa?

Answer

dmedvinsky picture dmedvinsky · May 24, 2012

make them ' ' lines means you need to replace the - in front of the line with a (space).