Reputation: 143
I've been having some strange errors lately. I have a working install of Git, but this is my shell output when committing changes:
$ git commit -m 'Removing crap'
error: unable to append to .git/logs/refs/heads/master
fatal: cannot update HEAD ref
Upvotes: 2
Views: 7521
Reputation: 19
The ownership can get messed up if you made changes as another user, e.g. root and then tried to push/pull etc. The sudo chown -Rc $UID .git/ fixed it for me too. Make sure that if you have nested .git folders, you make this change in the appropriate repo of your project.
Upvotes: 0
Reputation: 10686
Check the user and permission on .git/logs/refs/heads/master
This should might fix it it, at least on a unix machine:
sudo chown -Rc $UID .git/
Upvotes: 6