Note: mipadi (author of the accepted answer) also mentioned this error message in the context of case conflicts between filenames on different branches.
If cleaning the untracked files is a valid option, then the extreme solution is mentioned in this answer (a git clean -f -d
would remove all untracked files and directories).
In your case, that could be overkill (or dangerous).
Another original solution:
git checkout -f admin_playground # will overwrite files
git checkout yourBranch # get back where you where when trying the merge
git merge admin_playground
This forced git to go ahead and overwrite the files.
I assume you could have used the '-f
' option with merge
also, but switching to the other branch and then back fixed the issue and I was able to merge without any trouble the next time.
Note: there is actually no '-f
' option on git merge
.