In my case, the disk ran out of space, so I had to delete files from the hard drive to make space.
I've been having this same problem for the last few days. Basically, without my knowledge the entire repo had been moved to a new filesystem, when I tried to run git status, it was suddenly reporting that every file in the repo had been udpated.
So, after much google scouring, I tried the following:
The only thing that managed to solve the issue was to copy the index file, delete the original and rename the copy.
I know its not really a 'solution' but now its magically working ><, with all files / branches intact. If anyone knows why this might have work, do tell.
In my case, pausing dropbox sync solved the issue
I had the same issue on a Mac. It seems to be caused by filesystem ACLs. Try chmod -RN /path/to/repo
to clear the ACLs. After doing this I was able to commit changes. Using the trick to copy the index file, delete the original and move the copy back achieved the same result.
If you have your github setup in some sort of online syncing service, such as google drive or dropbox, try disabling the syncing as the syncing service tries to read/write to the file as github tries to do the same, leading to github not working correctly.
Closing Visual Studio Code (that in my case has an auto-uploader background job running on file-save) solved the issue for me.
Credit for the solution: my friend and colleague Arnel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With