+ 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.
Run Code Online (Sandbox Code Playgroud)
我根本不明白是什么make them ' ' lines意思.如何申请+ bbb但不是- aaa?
dme*_*sky 87
make them ' ' lines意味着你需要-用(空格)替换前面的行.
ell*_*eth 13
像这样的大块头:
+ bbb <-- line added
- aaa <-- line deleted
ccc <-- line unchanged
Run Code Online (Sandbox Code Playgroud)
会变成这样的内容:
bbb
ccc
Run Code Online (Sandbox Code Playgroud)
要保留标记为删除的行(前缀为'-'),请将其转换为与上一行具有相同前缀的unchanged行(因此它将保持不变):
+ bbb
aaa
ccc
Run Code Online (Sandbox Code Playgroud)
应用hunk时,内容将如下所示:
bbb
aaa
ccc
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7211 次 |
| 最近记录: |