Use Git’s mirroring functions. Steps:
-
Clone the Forgejo repo as a bare mirror:
git clone --mirror https://forgejo.example.com/user/repo.git
cd repo.git
-
Add GitHub as a mirror remote:
git remote add --mirror=push github https://github.com/user/repo.git
-
Push the mirror to GitHub:
git push --mirror github
To keep it updated, automate with cron or CI:
#!/bin/sh
cd /path/to/repo.git
git fetch -p origin
git push --mirror github
Run periodically.
This mirrors all branches, tags, and refs from Forgejo to GitHub.
no comments (yet)