74
+ 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

4

2 回答 2

120

make them ' ' lines表示您需要用(空格)替换-行前的。

于 2012-05-24T04:42:53.283 回答
24

像这样的大块头:

+ bbb <-- line added
- aaa <-- line deleted
  ccc <-- line unchanged

会变成这样的内容:

bbb
ccc

要保留标记为删除的行(以 为前缀'-'),请将其转换为与上述行具有相同前缀的unchanged行(因此它将保持不变):

+ bbb
  aaa
  ccc

应用大块时,内容将如下所示:

bbb
aaa
ccc
于 2012-05-24T05:19:42.383 回答