threads / discuss / 19526

(unknown)

Subject: (unknown)

## tl;dr

2 messages between May 27, 2009 and May 27, 2009.

replies: 1people: 2as markdown or json

David Forman· May 27, 2009, 13:28 UTC · lore

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· May 27, 2009, 14:00 UTC · re: David Forman · lore

Re: Error during git gc

(please provide a Subject: line)
"David Forman" <dforman@dairyfoodusa.com> writes:
Show 6 quoted lines
> 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

← back to recent threads