I encountered the same problem when the files in different branches had different case-sensitive file names.