Migrating to Forgejo / Codeberg
A practical migration guide for moving repositories from GitHub to Codeberg.
Why Codeberg
Non-profit, community-governed, runs on Forgejo (open source), European privacy standards, zero cost forever.
See Thoughts Codeberg for the reasoning.
Migration approach
Phase 1: dual presence
Keep GitHub active, mirror repos to Codeberg, add notices to READMEs.
Phase 2: Codeberg primary
New development on Codeberg. GitHub becomes read-only mirror.
Phase 3: archive GitHub
Archive repos with forwarding notices. Maintain mirrors for backwards compatibility.
Setting up a mirror
# Add Codeberg as primary origin
git remote rename origin github
git remote add origin git@codeberg.org:YOUR_USERNAME/REPO.git
git push -u origin main
Repository migration notice
Add to GitHub README:
# This Repository Has Moved
**New location**: https://codeberg.org/YOUR_USERNAME/REPO_NAME
All new development happens on Codeberg.
Issues and PRs should be opened there.
This repo remains as a read-only mirror.
Auto-mirror via GitHub Action
name: Mirror to GitHub
on:
push:
branches: [ main ]
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Push to GitHub Mirror
run: |
git remote add github \
https://x-access-token:${{ secrets.GITHUB_TOKEN }}\
@github.com/${{ github.repository }}.git
git push github main --force
Resources
Navigation
Quick Links
Projects
Server (discourse)
- Host
- Cloudflare Tunnel
- Tailscale
- SFTP
- Discourse
- Forgejo
- Filedrop
- Filebrowser
- Landing Sites
- Onboarding
- Backups
- Recovery
Window Managers
Homelab
Docker
Software
Thoughts
Archived
Connect
Butterbian — my Debian 13 distro · butterrepo — community APT repo · butterknife — TUI installer
justaguylinux.com · Butterforge · Butter Lab · The Churn · YouTube · Mastodon · Links · Contact · Support on Buy Me a Coffee
"Not an expert. Just A Guy." — Licensed CC BY-SA 4.0 · © 2026 JustAGuy Linux