Just want to share with all of you on how to solve "unable to update local ref" error when you try to "git pull"
# Just delete the .git/logs folder
$ rm -r .git/logs
and then try to
$ git pull
Hope I can help all of you that facing the same problem.
You may also use
git gc --prune=now