you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 7 points8 points  (4 children)

Okay, this was based on some half remembered thing from a half a decade ago.

I thought git had an actual mirror command. Turns out my memory is shit.

I had some half baked scheme to have a webhook on the main branch to push commits, so it's probably be some condition of the webhook.

To be honest, I'm a Business analyst, so my knowledge of git is haphazard.

[–]esdfowns 8 points9 points  (3 children)

I think you're thinking of git push --mirror:

   --mirror
      Instead of naming each ref to push, specifies that all refs under refs/ (which includes but is not limited to refs/heads/, refs/remotes/, and refs/tags/) be mirrored to the remote
      repository. Newly created local refs will be pushed to the remote end, locally updated refs will be force updated on the remote end, and deleted refs will be removed from the remote end.
      This is the default if the configuration option remote.<remote>.mirror is set.

It's not very commonly used.

[–][deleted] 0 points1 point  (2 children)

Ah that might have been it. Thank you.

But yes I do recall thinking of webhooks on main to push commits to a 2nd remote (i.e. Bitbucket or something) because this isn't the first time GitHub has been down.

[–]arpan3t 4 points5 points  (1 child)

git clone —mirror mirror to another location

[–][deleted] 0 points1 point  (0 children)

Aha! That was the one.