I was trying to merge my dev branch back into master after converting several views in an ASP.Net MVC project from the WebForms engine to Razor and the merge failed saying, "fatal: git write-tree failed to write a tree."
I'm not exactly sure why it failed. To git my files appeared to be renamed as I had created .cshtml files to replace the .aspx files, but I have renamed files in the past without this issue. Telling git to use a different merge strategy using the following command fixed the issue for me:
git merge -s resolve dev