I have been having a lot of issues using git (also, I'm a newb). Many times when I try to git push I run into errors. See below:
Counting objects: 8, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 6.03 KiB | 0 bytes/s, done.
Total 5 (delta 2), reused 0 (delta 0)
remote: error: insufficient permission for adding an object to repository database ./objects
remote: fatal: failed to write object
error: unpack failed: unpack-objects abnormal exit
To /Volumes/batcave/sourceControl/x.git
! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to '/Volumes/batcave/sourceControl/x.git'
The strange part about this is if I type:
git reset --hard origin/master
then
emacs testfile.txt
and enter text into the testfile.txt then do the usual:
git add .
git commit -a -m"added testfile.txt"
git push
that push works. So I don't buy it's that I don't have the proper permission. Also, sometimes if I just open the file that I was having problems pushing in emacs and add and delete some returns, then it works.
For further information, I'm using the git repository to keep my desktop pc and mac laptop synchronized.