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

Re: Way to "impersonate" remote or sync remotes without fetching everything?

From
D. Ben Knoble <ben.knoble@gmail.com>
Date
Apr 11, 2025, 18:43 UTC
Message-ID
<CALnO6CCUHE6-RcZkTBYT-CeXHnYPBPe1eGSogWd7=5tK5NyuxA@mail.gmail.com>
In-Reply-To
<2afd91ca-13d8-4b40-aa8b-c1917f0882df@frank.fyi>
On Sat, Apr 5, 2025 at 10:01 AM Klaus Frank <vger.kernel.org@frank.fyi> wrote:
> Also not to mention that none of my current approaches can do a real
> sync, they are all relying upon having one of the remotes designated as
> the authoritative source and if any of the others changed instead it'll
> just fail.

Maybe I haven't totally understood your use-case, but what if the authoritative source is your local repository, and then you push to all your remote mirrors to publish your trees? That is, I don't think it's a good idea to have a remote worker automatically pushing changes across all the mirrors; rather, you get to be in control of when you push to those mirrors.

(I thought there was a push-equivalent of remotes.<group>, which I was going to suggest as being helpful for this kind of mode where some remotes are your mirrors and others are collaborators, but I can't find it.) Configuring a new remote with pushurls that point to the other remotes [1] seems to be the way to make pushing to multiple remotes easy.

Of course, this doesn't help CI, but then it can just pick any mirror it wants to fetch a commit to build?

[1]: https://stackoverflow.com/a/14290145/4400820
-- 
D. Ben Knoble
Previous: Klaus FrankNext: Klaus Frank
Message 2 of 6 in “Way to "impersonate" remote or sync remotes without fetching everything?”
  1. Klaus FrankApr 5, 2025
  2. D. Ben KnobleApr 11, 2025
  3. Klaus FrankApr 11, 2025
  4. D. Ben KnobleApr 13, 2025
  5. Klaus FrankApr 14, 2025
  6. D. Ben KnobleApr 14, 2025

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.