Merging is not possible because you have unmerged files.
error: Merging is not possible because you have unmerged files. hint: Fix them up in the work tree, and then use 'git add/rm ' hint: as appropriate to mark resolution and make a commit. fatal: Exiting because of an unresolved conflict.
Thank you Linus Torvalds for these wonderful errors !
This can happen when you push a branch, do a pull request back to master using a web-based tool such as Stash or Github, then go back to your branch, do more commits and push, then do again a pull request and notice that the web-based tool is trying to merge back again all your changes, even the ones already merged.
So you merge master into your branch to actualize it then are hit with merge conflicts and if you try to go back to master you'll get this crap.
Solution
Don't do that. Don't continue editing your branch after it has merged with master. First sync up your branch with master after your PR has merged: `git pull origin master` so that your branch knows it has been merged in master. Then you can do new modifications in your branch and prepare a second PR.
Also to abort the merge (but keep your local changes):
$ git merge --abort
If you decide to proceed with the merge, carefully inspect each file one by one and add them and commit them. But if it doesn't look right, just abort the merge like above, keep a copy of your changes, create a fresh checkout and new branch where you add your wanted changes and redo the PR.
Pretty terrible explanation or lack thereof
You are right, I just improved it.