Let us start with talking about the default behavior. There are two ways of marking conflicts as resolved:
git add: It marks the conflicts as resolved, but keeps files in the index.
git reset: It marks the conflicts as resolved and removes files from the index
Adding files to the index after a conflict is resolved is on purpose. This way you can differentiate the changes from the previous stash and changes you made after the conflict was resolved. If you don't like it, you can always use git reset to remove everything from the index.
The following solution is also suggested by the Git, try to execute git status in the repository where you have a conflict:
Unmerged paths:
(use "git reset HEAD <file>..." to unstage)
(use "git add <file>..." to mark resolution)
Let us do what Git suggests without performing any useless commits:
- Resolve the conflict(s) manually or using some merge tool.
- Then use git reset to mark conflict(s) as resolved and unstage the changes. Also you can execute it without any parameters and Git will remove everything from the index. You don't have to execute git add before.
- Finally, remove the stash with git stash drop, because Git doesn't do that on conflict.
Translated to the command-line:
$ git stash pop
# ...resolve conflict(s)
$ git reset
$ git stash drop