Started a merge between branches in source tree and changed my mind. Wanted to redo the merge but am getting the error when starting the merge again :
"fatal: You have not concluded your merge (MERGE_HEAD exists).Please, commit your changes before you merge."
I cannot see any un-committed files but when clicking the "Commit", I get the previous merge changes.
How do I cancel this merge ?
Select conflicts in staged files, and select discard. 5. After discarding, Sourcetree will silently abort the merge, clear the file status screen and also discard any successfully merged files.
How do I cancel a git merge? Use git-reset or git merge --abort to cancel a merge that had conflicts. Please note that all the changes will be reset, and this operation cannot be reverted, so make sure to commit or git-stash all your changes before you start a merge.
simply run git reset --hard to revert all those changes.
You are in the merge process.
If you need to abort the merge, You need to get out of the merge by using git merge --abort
.
If not do a git status git status
to figure out what the conflicts and changes are and then commit those changes to continue with the merge.
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