Hello everyone!

We have been investing plenty of personal time and energy for many years to share our knowledge with you all. However, we now need your help to keep this blog running. All you have to do is just click one of the adverts on the site, otherwise it will sadly be taken down due to hosting etc. costs. Thank you.

Error below occurred when trying to commit staged files so follow the steps below to solve the problem.


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

Update permissions on git repository


Make sure your "group" can write to shared group repository.


inanzzz@inanzzz:~$ sudo find -iname '.git'
./.git
inanzzz@inanzzz:~$ cd ./.git
inanzzz@inanzzz:/.git$ sudo chgrp -R inanzzz .
inanzzz@inanzzz:/.git$ sudo chmod -R g+rwX .
inanzzz@inanzzz:/.git$ sudo find . -type d -exec chmod g+s '{}' +

or


inanzzz@inanzzz:~$ sudo find -iname '.git'
./.git
inanzzz@inanzzz:~$ cd ./.git
inanzzz@inanzzz:/.git$ sudo chgrp -R inanzzz *
inanzzz@inanzzz:/.git$ sudo chmod -R g+wX *
inanzzz@inanzzz:/.git$ git repo-config core.sharedRepository true