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

Re: [PATCH v3 3/4] gitfaq: add entry about syncing working trees

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 6, 2024, 05:50 UTC
Message-ID
<xmqqv81j3w8i.fsf@gitster.g>
In-Reply-To
<ZocPYKyVzSDIekTK@tapette.crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 11 quoted lines
> The most common situation we see is that refs tend to be renamed to
> things like "refs/heads/main 2", which is obviously not a valid refname
> and doesn't work, or the ref gets rolled back to an older version.
> Working trees also get stuck into weird states where files keep coming
> back or getting deleted, or the index gets two differently named copies,
> neither of which is "index".
>
> It is _less_ likely that objects are renamed, but it could be that the
> tool thinks they've been legitimately deleted if the loose objects get
> packed and then they do get deleted elsewhere without another source of
> those objects existing.

Yeah, any time two repositories that are "cloud synched" are accessed simultaneously, all h*ll can easily break loose. You may move your 'master' branch to a commit while the other one may move their 'master' branch to a different commit. You may end up having "master" that points at one of these commits but one of you may have already lost the only reference to the commit you wanted to have at the tip of your 'master' branch. One of you may even trigger auto-gc to spread the damage.

> If we have users who ask about this, I'm happy to answer them on the
> list.  I don't want to explain the various and sundry scenarios in the
> FAQ entry in order to keep it short, but I can find several examples of
> problems if need be.

OK, that approach would work as long as you are still involved in the project, but having even one concrete example would help in the longer term to (1) reduce the bus factor and (2) save time you do not have to spend responding to every such question.

Thanks.
Previous: brian m. carlsonNext: brian m. carlson
Message 8 of 22 in “Additional FAQ entries”
  1. 0/4 Additional FAQ entriesbrian m. carlson, Jul 4, 2024
  2. 2/4 gitfaq: give advice on using eol attribute in gitattributesbrian m. carlson, Jul 4, 2024
  3. Junio C HamanoJul 4, 2024
  4. brian m. carlsonJul 4, 2024
  5. 3/4 gitfaq: add entry about syncing working treesbrian m. carlson, Jul 4, 2024
  6. Junio C HamanoJul 4, 2024
  7. brian m. carlsonJul 4, 2024
  8. Junio C HamanoJul 6, 2024
  9. 1/4 gitfaq: add documentation on proxiesbrian m. carlson, Jul 4, 2024
  10. 4/4 doc: mention that proxies must be completely transparentbrian m. carlson, Jul 4, 2024
  11. Junio C HamanoJul 4, 2024
  12. Junio C HamanoJul 4, 2024
  13. brian m. carlsonJul 4, 2024
  14. Junio C HamanoJul 6, 2024
  15. brian m. carlsonJul 8, 2024
  16. Jeff KingJul 6, 2024
  17. Junio C HamanoJul 6, 2024
  18. 0/4 Additional FAQ entriesbrian m. carlson, Jul 9, 2024
  19. 1/4 gitfaq: add documentation on proxiesbrian m. carlson, Jul 9, 2024
  20. 3/4 gitfaq: add entry about syncing working treesbrian m. carlson, Jul 9, 2024
  21. 4/4 doc: mention that proxies must be completely transparentbrian m. carlson, Jul 9, 2024
  22. 2/4 gitfaq: give advice on using eol attribute in gitattributesbrian m. carlson, Jul 9, 2024

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.