GitHub will automatically transfer the code and all history.
Method 1: GitHub Import (easiest)
- Go to github.com/new/import
- Paste the GitLab repository URL
- For private repos, enter a GitLab Personal Access Token:
- GitLab → Settings → Access Tokens → scoperead_repository - Choose the repository name on GitHub, Public/Private
- Click Begin import
GitHub will automatically transfer the code and all history.
Method 2: Git mirror (full control)
# 1. Clone from GitLab
git clone --bare https://gitlab.com/username/project.git
# 2. Mirror push to GitHub
cd project.git
git push --mirror https://github.com/username/project.git
# 3. Remove the temporary folder
cd ..
rm -rf project.git
--bare — Git data only, no working files. --mirror — copies all branches, tags, and refs.
Method 3: Via GitHub Desktop
- File → Clone Repository → URL → paste the GitLab HTTPS URL
- After cloning: Publish repository
What Transfers
| Transfers | Does NOT transfer |
|---|---|
| Code | Issues |
| Commit history | Merge Requests |
| All branches | CI/CD Pipelines |
| Tags | Wiki |
| Commit authors | Labels, Milestones |
CI/CD: GitLab → GitHub Actions
Before (.gitlab-ci.yml):
test:
image: python:3.12
script:
- pip install -r requirements.txt
- pytest
After (.github/workflows/ci.yml):
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install -r requirements.txt
- run: pytest
Update README Badges
# Before (GitLab)
[]
# After (GitHub)

Update Remote for Team Members
git remote set-url origin https://github.com/username/project.git
git fetch
Migration Checklist
- [ ] Created repository on GitHub
- [ ] Transferred code (
git push --mirror) - [ ] Set up GitHub Actions (replaced
.gitlab-ci.yml) - [ ] Updated README (badges, links)
- [ ] Configured branch protection
- [ ] Updated CI/CD secrets
- [ ] Notified the team to update their remote
- [ ] Made the GitLab repository read-only
💬 Comments (0)
No comments yet
Be the first to share your opinion about this article!