Mar 14 2018

How to fix Git commit insufficient permission error

When git commit gives this error:

error: insufficient permission for adding an object to repository database .git/objects

take back ownership of all Git objects by runnning:

cd <path-to-repo>
cd .git/objects
sudo chown -R <username>:<username> *