+ 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.
我簡直不明白make them ' ' lines
是什麼意思。如何申請+ bbb
而不是- aaa
?git hunk編輯模式 - 如何刪除' - '行?
很說教的消息... – jacktrades
要補充的,如果與'vim'編輯和你想跨越多條線路,如大規模替換,7-200,下面的命令會做:':7,200s/^ -//'。這個正則表達式在指定範圍內的每一行的開始處搜索單個「-',並用一個空格替換它。 – Adama
真棒我不知道該怎麼做,直到看到這個答案。謝謝 –