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?
It happened today to me, I need to do a merge in a new branch created from develop with certain changes from another branch...
I tried the solution from Michael Sorens but it need an additional step... git add .
if you have some conflict
git checkout -b mynewbranchfromdevelop
git merge AnotherBranchToMergeIntoMynewbranchfromdevelop
it have conflicts, I tried to make a git stash but "needs merge" messages appears, simply what I have to do is to use
git add .
to take those conflicts as resolved and staged (but still need git commit to conclude merge), then
git stash
will save those changes in a stash, and if you check with "git status" there is nothing to commit and working tree clean
git stash apply
and you will have those changes in local directory of current branch without commit