Graham King

Solvitas perambulum

git: Resolving 'git gc' error: cannot lock ref

software

If you get an error like this from git::

Auto packing the repository for optimum performance. You may also
run "git gc" manually. See "git help gc" for more information.
error: cannot lock ref 'HEAD (xyz's conflicted copy 2011-06-02)'
error: cannot lock ref 'refs/heads/master (xyz's conflicted copy 2011-06-02)'
error: failed to run reflog

You just need to delete the offending files from .git/logs/ and run your operation again.