Sourcetree可以轻松地暂存和取消暂存补丁块,也可以轻松地从补丁块中选择特定的行并将其暂存或取消暂存。 我正在尝试弄清楚如何通过命令行执行相同的操作。
我尝试在Sourcetree中执行每个操作,并显示命令历史记录面板。 但是当我执行这些操作时,它不会显示任何命令。 对于其他操作,它可以正常工作。
在命令行上,我使用交互模式下的git add命令,选择补丁选项,然后选择一个具有多行更改的文件。 提示是:“Stage this hunk [y,n,q,a,d,/,e,?]?” 如果我选择“?”选项,则输出此帮助文本:
`s`选项看起来是从块中分离出单独行的正确选项。然而,当我输入它时,git只是再次输出帮助文本。
有人能告诉我应该在文档的哪个部分查找吗?
我尝试在Sourcetree中执行每个操作,并显示命令历史记录面板。 但是当我执行这些操作时,它不会显示任何命令。 对于其他操作,它可以正常工作。
在命令行上,我使用交互模式下的git add命令,选择补丁选项,然后选择一个具有多行更改的文件。 提示是:“Stage this hunk [y,n,q,a,d,/,e,?]?” 如果我选择“?”选项,则输出此帮助文本:
y - stage this hunk
n - do not stage this hunk
q - quit; do not stage this hunk or any of the remaining ones
a - stage this hunk and all later hunks in the file
d - do not stage this hunk or any of the later 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
`s`选项看起来是从块中分离出单独行的正确选项。然而,当我输入它时,git只是再次输出帮助文本。
有人能告诉我应该在文档的哪个部分查找吗?