git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Error during git gc

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
May 27, 2009, 14:00 UTC
Message-ID
<vpqeiua8x3g.fsf@bauges.imag.fr>
In-Reply-To
<APEJLFBGDNOMCHGLHIHFEEKPDEAA.dforman@dairyfoodusa.com>
(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
Previous: David Forman
Message 2 of 2 in “(unknown)”
  1. David FormanMay 27, 2009
  2. Matthieu MoyMay 27, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.