我有一个文件,我一直在努力,然后意识到我在我工作的几行上面有一个错误.我很快就修正了这个错误,并且在我完成剩下的工作之前想要提交它.太好了,这就是git add --patch的用武之地!
除此之外,我只会看到一个包含两个变化的大块头.是否有可能手动告诉git我想要两个帅哥?
Jim*_*uls 46
除了'y'和'n'之外,当你问起一个大块头时,你可以给出的答案之一是"s",因为"将这个大块头分成了较小的帅哥".完整清单:
y - stage this hunk
n - do not stage this hunk
q - quit, do not stage this hunk nor any of the remaining ones
a - stage this and all the remaining hunks in the file
d - do not stage this hunk nor any of the remaining hunks in the file
g - select a hunk to go to
/ - search for a hunk matching the given regex
j - leave this hunk undecided, see next undecided hunk
J - leave this hunk undecided, see next hunk
k - leave this hunk undecided, see previous undecided hunk
K - leave this hunk undecided, see previous hunk
s - split the current hunk into smaller hunks
e - manually edit the current hunk
? - print help
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3857 次 |
| 最近记录: |