I did a Git rebase, fixed the conflict and force pushed already, why it is still rebase mode, "dev|REBASE 2/3" ? how to exit it ? I don't want to throw away the rebase.
aaa@lenovo-pc MINGW64 ~/Documents/NetBeansProjects/GitTest1 (dev|REBASE 2/3)
$ git status
rebase in progress; onto f67f4c5
You are currently rebasing branch 'dev' on 'f67f4c5'.
(all conflicts fixed: run "git rebase --continue")
nothing to commit, working tree clean
aaa@lenovo-pc MINGW64 ~/Documents/NetBeansProjects/GitTest1 (dev|REBASE 2/3)
$ git push --force origin dev
[email protected]'s password:
Everything up-to-date
aaa@lenovo-pc MINGW64 ~/Documents/NetBeansProjects/GitTest1 (dev|REBASE 2/3)
Thanks
git rebase --abort
this should do the trick for you.
UPD:
git rebase is somewhat "atomic" operation. You cannot finish it in the middle. Think of it as of the transaction. It either finishes or not. If you think that you're finished, but your working copy is still in "rebase" mode than means you've done something wrong, i.e.:
git commit
How to resolve a conflict? Well, that is a good separate question.
I have generally found that simply following the instructions which prompts to you during the rebase process usually doesn't go wrong. Based on the snippet you showed us, which says:
(all conflicts fixed: run "git rebase --continue")
your next move probably should have been to run git rebase --continue
to finish the rebase, or at least move to the next applied commit.
What to do now:
Instead of completing/continuing with the rebase, you force pushed the dev
branch to the remote. Since you would likely have to force push this anyway after the rebase, I don't see any long term harm being done. So you should just complete the rebase by doing
git rebase --continue
and then force push again once the rebase is actually completed.
By the way, if you decide that you really want to throw away the rebase, you can do so via
git rebase --abort
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