The good news first: Git is Git. GitHub didn't invent it and doesn't own it, which means moving your code elsewhere is fundamentally a git push away. This guide walks through migrating to codetrunk.eu — EU-hosted Git powered by Forgejo — covering code, issues, and pull requests.
Step 1: Create your account
Register and verify your email. A Forgejo workspace is provisioned automatically — no setup, no server, no configuration.
Step 2: Move the code
Two options, depending on the repository.
Option A — change the remote (fastest, code only):
git remote set-url origin https://repos.codetrunk.eu/you/your-app.git
git push -u origin main
Push any other branches and tags you want to keep:
git push origin --all
git push origin --tags
Option B — Forgejo's built-in migration (code + metadata):
In the Forgejo interface, choose New Migration, paste the GitHub repository URL, and authenticate with a GitHub token. Forgejo imports the repository along with issues, pull requests, labels, milestones, and releases. For anything beyond a bare code move, this is the option you want.
What arrives, and what stays behind
Option B copies more than code. The split below is what Forgejo's importer actually does — not what a checklist claims.
Comes across: the full commit history with every branch and tag, the description and topics, issues with their comments, labels, milestones, assignees and open/closed state, pull requests with their reviews and comments, and releases with their tags and attached files.
Five things do not move at all:
- The wiki. The GitHub importer never reads it. Clone the wiki repository and push it as a normal repository if you want to keep those pages.
- Anything Actions beyond the YAML. Workflow files arrive as files in the repository. Secrets, variables, runner labels, and the run history with its logs and artifacts stay on GitHub.
- Packages. Container images and npm, Maven or NuGet packages published to GitHub Packages have no import path.
- Projects and Discussions. Neither has an importer.
- Repository settings. Branch protection rules, webhooks, deploy keys, collaborator permissions and stars stay behind.
One caveat that catches people: large files. Git LFS objects only come across when the importer is given an LFS endpoint. Without one you get the pointers and not the content — and the repository looks healthy until someone clones it.
One checkbox decides where private code ends up
On the migration form, the visibility of the new repository is taken from the Private checkbox, not from the source. Migrate a private GitHub repository with that box unticked and the copy is created public — history included, visible from the first second.
Tick it before you press migrate if there is anything in the repository you would not publish. You can make a repository private afterwards, but the window existed, and anything that fetched it in that window keeps its copy.
Step 3: Redirect your collaborators
Update the remotes on every machine and CI system that pushes to the old repository:
git remote set-url origin https://repos.codetrunk.eu/you/your-app.git
If you keep the GitHub repository around during a transition period, set it to a mirror push or archive it with a README pointer to the new home. Don't leave two writable copies — diverging history is the one way this migration actually goes wrong.
Step 4: Webhooks and integrations
Recreate any webhooks in the repository settings on Forgejo. Most services that integrate via a Git remote or a plain webhook (deployment targets, status bots) work unchanged.
What you get for the trouble
- Your code hosted in the European Union, under EU law — not a US cloud region
- No AI training on your repositories — contractual, not a toggle
- An open-source platform with no lock-in: export or move to any other Forgejo instance whenever you like
The full feature comparison is on our GitHub alternative page, and plans start at free — see pricing.