I am rebasing in git and am encountering many conflicts. I address each one and do git rebase --continue
, only to be met with the next conflict. How can I see how close I am to successfully completing the rebase?
If you're using git-prompt.sh, your prompt will show something like |REBASE-i (x/y) when resolving a conflict during an interactive rebase, where x is rebase step out of y where the conflict occurred. Show activity on this post. If you just want to take a look at it and you're using Bash, you can run: __git_ps1 .
Since a recent Gitlab upgrade we have the problem that the rebase operation in merge requests takes around ten minutes in some developers' repositories while it works perfectly fast in others.
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. In the error output is a line that looks like
Patch failed at 0003 <commit message>
0003 means you're three commits into the 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
).
Alternatively you could also directly grep for the conflict markers.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With