Let me start with some context:
I had to upgrade a crucial Magento webshop to a new version. To be sure all existing code would still work after the upgrade and make
I've seen a few reports of this happening when you do "git init --bare" in a non-empty directory.
Are you by any chance working in/with a "bare"/"server" repository that isn't empty (that is, has anything else besides the .git directory in it)?