No description
Find a file
2025-10-20 20:19:11 +02:00
.vscode Sort imports with ruff 2025-10-20 20:19:11 +02:00
gh_migri Sort imports with ruff 2025-10-20 20:19:11 +02:00
.gitignore Initial commit 2025-09-06 20:54:59 +02:00
env.example Initial commit 2025-09-06 20:54:59 +02:00
poetry.lock Initial commit 2025-09-06 20:54:59 +02:00
pyproject.toml Sort imports with ruff 2025-10-20 20:19:11 +02:00
README.md Initial commit 2025-09-06 20:54:59 +02:00

gh-migri

Migrate your repos from GitHub to any Forgejo instance, without needing any token, and keeping a local copy of your repos.

Purpose

This is not a full migration toll, use the Forgejo web UI or API for that.

I wrote this one because I wanted to be able to migrate some of my GitHub repos, one at a time, without caring about forks, pull requests or issues.

This tool only migrates the Git history (branches and tags)

Setup

Install this repo with poetry.

Create a token of Forgejo, with the following permissions:

  • write:organization
  • write:repository
  • write:user

Copy/paste the file env.example to .env and fill the values.

Usage

Run:

poetry run  gh-migri <name>

The tool is idempotent, so feel free to re-run it to synchronise your code again.