# (unknown)

2 messages from 2009-05-27 to 2009-05-27. Participants: David Forman, Matthieu Moy.
Thread: https://gitlist.dev/t/19526

## David Forman, 2009-05-27 13:28

Subject: (unknown)
Message-ID: <APEJLFBGDNOMCHGLHIHFEEKPDEAA.dforman@dairyfoodusa.com>
URL: https://gitlist.dev/e/APEJLFBGDNOMCHGLHIHFEEKPDEAA.dforman%40dairyfoodusa.com

```
I've encountered the following whenever I access Git and try to compress the
database due to loose objects.

error: cannot lock ref 'HEAD~'
error: cannot lock ref 'refs/heads/collections~'
error: cannot lock ref 'refs/heads/master~'

I'm on a Windows box (no comments please!), I've tried gc from the command
line, as well as the GUI option, with the same results. Any help would be
greatly appreciated, last count was over 2000 loose objects.

Thanks,

David Forman
Systems Manager
dairyfood USA, Inc.

```

## Matthieu Moy, 2009-05-27 14:00

Subject: Re: Error during git gc
Message-ID: <vpqeiua8x3g.fsf@bauges.imag.fr>
URL: https://gitlist.dev/e/vpqeiua8x3g.fsf%40bauges.imag.fr
In-Reply-To: <APEJLFBGDNOMCHGLHIHFEEKPDEAA.dforman@dairyfoodusa.com>

```
(please provide a Subject: line)

"David Forman" <dforman@dairyfoodusa.com> writes:

> I've encountered the following whenever I access Git and try to compress the
> database due to loose objects.
>
> error: cannot lock ref 'HEAD~'
> error: cannot lock ref 'refs/heads/collections~'
> error: cannot lock ref 'refs/heads/master~'

I'd say you've edited the files .git/HEAD, refs/heads/collections, ...
manually with a text editor that leaves ~ backup files. Unless you
_really_ have branches called collections~ and master~, you can move
these three files (in a temporary folder, or to trash if you're
confident enough).

-- 
Matthieu

```
