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

Re: files are disappearing in git

From
Junio C Hamano <junkio@cox.net>
Date
Nov 25, 2005, 21:28 UTC
Message-ID
<7virugmn8f.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20051125195121.GG16995@mythryan2.michonline.com>
Ryan Anderson <ryan@michonline.com> writes:
Show 9 quoted lines
> Can something like this sequence do it?
>
> ...
>
> The key point being that the merge is done in a tree that has its index
> out of sync with its HEAD (git push ../tree2/ .... git pull ../tree3/ )
>
> I think that's the situation where I've personally managed to lose
> and/or revert some changes.

The moral of the story is not to push into the checked-out branch of a non-naked repository, or you need to do what you are doing if you choose to do so. It might have made sense if index file recorded which tree object its contents came from, but I am not sure what tools is responsible for recording that if we choose to extend index file to store that information. Probably read-tree is, but it should not do that unconditionally.

In any case, the workflow presented by Nick is that individual developers use cg-* commands in CVS like workflow where the only place you push into is the central repository and everybody pulls from there, so I do not think the above example applies.

Previous: Ryan AndersonNext: Linus Torvalds
Message 11 of 15 in “files are disappearing in git”
  1. Nico -telmich- SchotteliusNov 23, 2005
  2. Linus TorvaldsNov 23, 2005
  3. Nico -telmich- SchotteliusNov 24, 2005
  4. Junio C HamanoNov 24, 2005
  5. Nico -telmich- SchotteliusNov 24, 2005
  6. Ryan AndersonNov 25, 2005
  7. Nico -telmich- SchotteliusNov 25, 2005
  8. Linus TorvaldsNov 25, 2005
  9. Petr BaudisNov 25, 2005
  10. Ryan AndersonNov 25, 2005
  11. Junio C HamanoNov 25, 2005
  12. Linus TorvaldsNov 25, 2005
  13. Petr BaudisNov 25, 2005
  14. Nico -telmich- SchotteliusNov 25, 2005
  15. Petr BaudisNov 25, 2005

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.