For example, if I am on feature branch now, I want to rebase it to master branch, so I run the following command.
git rebase master
As I have known, git will switch to branch master, find merge base of feature and master branch, and apply patches of feature branch to master branch one by one.
Now I encounter a conflict, I run git difftool to solve conflict. When solving conflict, I edit my source code to the merged status and I do not want the sequential patches. How can I finish git rebase now?
If you want to stop rebase in the middle, you should do the following.
git add, and create a new commit with git commit.git tag it with a temporary tag, but also you can simply remember it's SHA-1. git rebase --abort to return your branch to the state it was before the rebasegit reset --hard <tag_name_or_remembered_SHA1>.In any case you can revert the changes with git reset --hard. You can check the output of git reflog to see the whole list of recent actions including rebase, resets and new commits.
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