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

Re: Corrupted git repository?

From
Johannes Sixt <j6t@kdbg.org>
Date
Feb 16, 2011, 18:54 UTC
Message-ID
<201102161954.26766.j6t@kdbg.org>
In-Reply-To
<AANLkTimZgpWUAncLgO=y5CvKsYGdYWTHNUzncjrC5UO6@mail.gmail.com>
On Mittwoch, 16. Februar 2011, Piotr Krukowiecki wrote:
Show 16 quoted lines
> I have deleted the whole top-level directory in which the file was and run:
>
> $ git status | grep  <<PATH>>
> #	deleted:    <<PATH>>
>
> $ git checkout -- <<top dir>>
>
> $ git status
> # On branch master
> nothing to commit (working directory clean)
>
> $ git cherry-pick 7d193bb0c1f14908361d9d9d5e30f0c12d5f2c2f
> error: Your local changes to the following files would be overwritten by
> merge: <<PATH>>
> Please, commit your changes or stash them before you can merge.
> Aborting

A wild guess: You are on Windows or OS/X, and the file exists in your worktree with different uppercase/lowercase name? Rename the file so that its case is the same as it is recorded in the repository.

-- Hannes
Previous: Piotr KrukowieckiNext: Piotr Krukowiecki
Message 4 of 5 in “Corrupted git repository?”
  1. Piotr KrukowieckiFeb 15, 2011
  2. Junio C HamanoFeb 15, 2011
  3. Piotr KrukowieckiFeb 16, 2011
  4. Johannes SixtFeb 16, 2011
  5. Piotr KrukowieckiFeb 16, 2011

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.