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

Re: Broken index file - any hope?

From
JWJeff Whiteside <jeff.m.whiteside@gmail.com>
Date
Oct 3, 2008, 22:09 UTC
Message-ID
<3ab397d0810031509i3e54252cp260a78de1d3faf8a@mail.gmail.com>
In-Reply-To
<48E696CB.6040405@gmx.de>

I don't know if you're new to git, but I used git for about a year before I knew what the index really was.

Remember, the index file only stores changes you made to the checkedout code AFTER the last commit, so all your commits are safely in the tree objects still.

The index is only a place to store changes you made with "git add", not "git commit".

I'm not sure how you refresh the index file but i would back everything up and try a "git reset --hard" or something.

On Fri, Oct 3, 2008 at 3:03 PM, Jonas Schneider <JonasSchneider@gmx.de> wrote:
Show 19 quoted lines
> Shawn O. Pearce schrieb:
>>
>>  git read-tree --reset HEAD
>
> Sadly, this doesnt help. I still get the same error.
> But, if I remove the corrupt index file, I get this:
>
> fatal: just how do you expect me to merge 0 trees?
>
> Does not look like a good sign :/
> Are all my branches (branch==tree?) gone? (okay, werent that much)
>
> Thanks anyway :)
> -- Jonas
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Previous: Shawn O. PearceNext: Linus Torvalds
Message 5 of 6 in “Broken index file - any hope?”
  1. Jonas SchneiderOct 3, 2008
  2. Shawn O. PearceOct 3, 2008
  3. Jonas SchneiderOct 3, 2008
  4. Shawn O. PearceOct 3, 2008
  5. Jeff WhitesideOct 3, 2008
  6. Linus TorvaldsOct 4, 2008

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.