Dear list,
I cannot commit to a repo of mine. I get the following error after
saving message text in editor (with "git commit -p")
error: Unable to append to .git/logs/refs/heads/master: Permission
denied
fatal: Cannot update the ref 'HEAD'.
I thought I mistakenly commited a change as root (I didn’t commit
anything as root). I’m afraid it ran "git gc" as root and this changed
ownerships for some files in the .git directory.
Since this is a file permission issue, I found this command to fix it:
sudo chown -R "${USER:-$(id -un)}" .
I guess the answer to my question will be affirmative, but I raise it:
is this the right way to fix my issue?
Many thanks for your help,
Pablo
--
http://www.ousia.tk
--
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.