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

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

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Oct 20, 2021, 12:09 UTC
Message-ID
<nycvar.QRO.7.76.6.2110201403420.56@tvgsbejvaqbjf.bet>
In-Reply-To
<20211020010624.675562-6-sandals@crustytoothpaste.net>
Hi brian,
On Wed, 20 Oct 2021, brian m. carlson wrote:
> Users very commonly want to sync their working tree across machines,

I was confused at first, because I do sync my working trees frequently. I do this via `git push` and `git pull`, though.

Maybe clarify that you mean rsync, or sync services like DropBox and OneDrive? I see that you mention "cloud syncing service" below, but I believe that it might be better to lead with the examples.

Show 25 quoted lines
> often to carry across in-progress work or stashes.  Despite this not
> being a recommended approach, users want to do it and are not dissuaded
> by suggestions not to, so let's recommend a sensible technique.
>
> The technique that many users are using is their preferred cloud syncing
> service, which is a bad idea.  Users have reported problems where they
> end up with duplicate files that won't go away (with names like "file.c
> 2"), broken references, oddly named references that have date stamps
> appended to them, missing objects, and general corruption and data loss.
> That's because almost all of these tools sync file by file, which is a
> great technique if your project is a single word processing document or
> spreadsheet, but is utterly abysmal for Git repositories because they
> don't necessarily snapshot the entire repository correctly.  They also
> tend to sync the files immediately instead of when the repository is
> quiescent, so writing multiple files, as occurs during a commit or a gc,
> can confuse the tools and lead to corruption.
>
> We know that the old standby, rsync, is up to the task, provided that
> the repository is quiescent, so let's suggest that and dissuade people
> from using cloud syncing tools.  Let's tell people about common things
> they should be aware of before doing this and that this is still
> potentially risky.  Additionally, let's tell people that Git's security
> model does not permit sharing working trees across users in case they
> planned to do that.  While we'd still prefer users didn't try to do
> this, hopefully this will lead them in a safer direction.
The remainder of the commit message is very clear.

Thank you, Dscho

Previous: brian m. carlsonNext: brian m. carlson
Message 17 of 30 in “Additional FAQ entries”
  1. 0/4 Additional FAQ entriesbrian m. carlson, Oct 20, 2021
  2. 3/4 gitfaq: give advice on using eol attribute in gitattributesbrian m. carlson, Oct 20, 2021
  3. Eric SunshineOct 20, 2021
  4. brian m. carlsonOct 20, 2021
  5. Johannes SchindelinOct 20, 2021
  6. brian m. carlsonOct 20, 2021
  7. Johannes SchindelinOct 21, 2021
  8. 4/4 doc: add a FAQ entry about syncing working treesbrian m. carlson, Oct 20, 2021
  9. Bagas SanjayaOct 20, 2021
  10. Philip OakleyOct 20, 2021
  11. Ævar Arnfjörð BjarmasonOct 20, 2021
  12. brian m. carlsonOct 21, 2021
  13. Ævar Arnfjörð BjarmasonOct 21, 2021
  14. 4/4 gitfaq: add entry about syncing working treesbrian m. carlson, Oct 20, 2021
  15. Eric SunshineOct 20, 2021
  16. brian m. carlsonOct 20, 2021
  17. Johannes SchindelinOct 20, 2021
  18. 1/4 gitfaq: add advice on monoreposbrian m. carlson, Oct 20, 2021
  19. Bagas SanjayaOct 20, 2021
  20. Ævar Arnfjörð BjarmasonOct 20, 2021
  21. brian m. carlsonOct 20, 2021
  22. Johannes SchindelinOct 20, 2021
  23. Philip OakleyOct 20, 2021
  24. brian m. carlsonOct 20, 2021
  25. Philip OakleyOct 25, 2021
  26. 2/4 gitfaq: add documentation on proxiesbrian m. carlson, Oct 20, 2021
  27. Johannes SchindelinOct 20, 2021
  28. brian m. carlsonOct 20, 2021
  29. Junio C HamanoOct 20, 2021
  30. brian m. carlsonOct 20, 2021

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.