I\'m getting a strange \"cannot lock ref\" error when trying to pull changes from github. I\'ve tried git gc, and looked around for similar errors but can\'t find a solution.>
Running
git remote prune origin
Worked for me. Not sure why this was the issue, but seems like there was a broken reference to a remote branch.