[英]How can I tell how far into a git rebase I am when resolving conflicts?
I am rebasing in git and am encountering many conflicts.我在 git 中变基,遇到了很多冲突。 I address each one and do git rebase --continue
, only to be met with the next conflict.我解决每个问题并执行git rebase --continue
,只是遇到下一个冲突。 How can I see how close I am to successfully completing the rebase?我如何才能看到我离成功完成 rebase 有多近?
I'm not sure if you can get a measure of how far you have to go, but it lists how many commits into the rebase you are.我不确定您是否可以衡量到 go 的距离,但它列出了您在变基中的提交次数。 In the error output is a line that looks like在错误 output 是一条看起来像
Patch failed at 0003 <commit message>
0003 means you're three commits into the rebase. 0003 表示您向 rebase 提交了三个提交。
It looks like you can see a list of patches here:看起来您可以在此处看到补丁列表:
.git/rebase-apply/[0-9]*
If your question is about seeing how many conflicts are already resolved, I have I usually do a quick如果您的问题是关于查看已经解决了多少冲突,我通常会快速
$ git diff
while doing a rebase.在进行变基时。 Conflicting parts will not be staged yet (assuming you are using git mergetool
).冲突的部分将不会暂存(假设您使用的是git mergetool
)。
Alternatively you could also directly grep for the conflict markers.或者,您也可以直接 grep 作为冲突标记。
If you want to know how many commits were already applied, just use如果您想知道已经应用了多少次提交,只需使用
$ git log REBASE_BASE..
where REBASE_BASE
is the commit you are rebasing onto.其中REBASE_BASE
是您要基于的提交。
The text file.git/sequencer/todo will show you the next commits to be rebased or cherry-picked.文本 file.git/sequencer/todo 将向您显示下一个要重新定位或挑选的提交。
Also, in Windows, the Git Bash shell has the rebase progress status in the prompt in the following format:此外,在 Windows 中,Git Bash Z2591C98B70119FE624898B1E424B5 rebase 格式中的进度提示 9
(branch-name|REBASE 1/10)
From Powershell I can get to Git Bash with this command:从 Powershell 我可以使用以下命令到达 Git Bash:
sh --login
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.