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 13, 2025, 21:52 UTC
Message-ID
<CALnO6CALCFLWSs9HBWX13V_BUZkoeZuVjHVnF4_e0OMy3LfEjw@mail.gmail.com>
In-Reply-To
<669a6a0f-bcfb-4596-a0c8-73c722a6ec10@frank.fyi>
On Fri, Apr 11, 2025 at 3:02 PM Klaus Frank <vger.kernel.org@frank.fyi> wrote:
Show 23 quoted lines
>
> On 2025-04-11 20:43:24, D. Ben Knoble wrote:
> > Maybe I haven't totally understood your use-case, but what if the
> > authoritative source is your local repository, and then you push to
>
> There is no local repository, that's kinda the source of all of this.
> The sync script runs in a CI/CD. I'm kinda abusing CI/CD here to run
> a kind of cron job, in a separate repository that does the sync, maybe it
> is easier to just call it scheduled pipeline/action or just stateless
> cron job?
>
> Lets make a more quick example:
>
> gdm is being developed here: https://gitlab.gnome.org/GNOME/gdm
> so in order to make a PR I'll have to create a fork in that GitLab
> instance so now we're at 2 repositories. Then I want to have my own
> independent archive mirror in my own gitlab instance. Then I also
> want to mirror it onto gitlab.com and github.com just for the sake of
> this example. Now we're at 5 remotes.
>
> Now I'd like to have a script in CI/CD (that runs server side) to sync
> all of them. In example the gnome.org one could probably mostly be the
> autoritative source (except for the branches that contain my changes).

That all makes sense, except: why need the sync (cron) job? Treat a local copy as authoritative for you and push to all your remotes. This puts you in control at the cost of not happening automatically. (You could conceivably have a local cron job that did this.)

-- 
D. Ben Knoble
Previous: Klaus FrankNext: Klaus Frank
Message 4 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.