Add a script to mirror main to GitHub after the move to Gitea
Werkator's canonical repository now lives on git.javagil.de; GitHub stays around as a public mirror. This keeps its main branch in sync without touching any other branch or the repo's other history. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
4f2ad3b244
commit
4d76a93927
Executable
+19
@@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Push the current main branch to the GitHub mirror.
|
||||||
|
#
|
||||||
|
# Werkator's canonical repository lives on git.javagil.de (Gitea, remote
|
||||||
|
# "origin"); GitHub stays around as a public read-only mirror (remote
|
||||||
|
# "github"). This script keeps that mirror's main branch in sync — nothing
|
||||||
|
# else: no other branches, no force-push, no tags. Run it after pushing main
|
||||||
|
# to origin, or set it up as a post-push hook / cron job if that becomes
|
||||||
|
# annoying to remember.
|
||||||
|
#
|
||||||
|
# Usage: tools/push-github-mirror.sh
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
git fetch origin main
|
||||||
|
git push github refs/remotes/origin/main:refs/heads/main
|
||||||
Reference in New Issue
Block a user