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?
Language is notoriously ambiguous. :-) When you say "keep local changes" you could mean either:
This simple solution addresses point (1):
$ git stash save
$ git stash pop
Here's a transcript showing the affect:
$ git status
On branch stuff-217/apply-new-config-details
All conflicts fixed but you are still merging. <<<<<< notice this line!
Changes to be committed:
modified: package.json
modified: src/wallabyTest.ts
modified: wallaby.js
$ git stash save
Saved working directory and index state WIP on stuff-217/apply-new-config-details...
$ git status
On branch stuff-217/apply-new-config-details
nothing to commit, working tree clean
$ git stash pop
On branch stuff-217/apply-new-config-details
<<<<<< no longer in the merge!
Changes not staged for commit:
modified: package.json
modified: src/wallabyTest.ts
modified: wallaby.js