我通常会添加更改git add -p,并且很多时候会有大量的代码块,由空行分隔.
但是,git不再split是大块头,我不得不求助于手动编辑.
如何增加帅哥的粒度,使每个代码块都在一个单独的大块中?
编辑:这是一个与Git不同的问题:使用git add -i或git add -e时显示更多上下文?因为我不打算增加每个大块头的上下文,而是增加帅哥的数量.
Cod*_*ard 10
它不能完成,
您可以在add -p以下选项中执行以下选项:
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)
一旦你使用s它,它将选择可被视为独立更改的代码块.如果你想要拆分更多,你将不得不使用e编辑块,然后将其添加回舞台区域.
分裂帅哥你使用s旗帜.
如果需要将其拆分为更小的块,则需要使用该e选项手动编辑它.
| 归档时间: |
|
| 查看次数: |
760 次 |
| 最近记录: |