Git Mirror

Provider-agnostic mirroring of git repositories

Recently, I started moving most of my archived projects from GitHub onto my own Git server. Unfortunately, the self hosted offerings aren’t perfect for mirroring. Gitea supports mirroring repositories into itself, but not pushing (work is planned). GitLab supports pushing repositories to an upstream, but not mirroring into itself unless you pay them a lot of money.

This meant if I wanted the primary for my repositories to be on my server, but still be visible on GitHub, I couldn’t. That is, unless I wrote something myself.

git-mirror is a small scheduler which simply pushes changes from repository to another. Simply specify an interval, a source repository and a destination, and it’ll handle the rest. It only runs on a schedule rather than detecting automatically, but this makes it platform agnostic.

View on GitHub

Since writing git-mirror I’ve moved from Gitea to GitLab, which has native push support. I do plan to migrate back to Gitea just as soon as they have push mirror support. Or sooner, we’ll see.

Share this page

Buy Me A Coffee