I started a git merge, but made local changes that I want to keep. I no longer want to merge, and instead continue to work on the local changes. How do I do this?
First, copy the folder you're working in in case something bad happens. Git is usually pretty bulletproof, but if you start using git reset --hard
, it's possible for bad things to happen.
Then, do a git commit --patch
, picking only the changes that you want to keep and leaving everything that the merge did. Once you've committed those changes, do a git reset --hard
, and the merge should be gone, but your changes should still be there.