Also update: README links, CI/CD secrets, webhooks, documentation.
Method 1: Via GitHub Desktop
- Open GitHub Desktop: File → Clone Repository → URL
- Paste the Bitbucket repository HTTPS URL → Clone
- After cloning, click Publish repository
- Choose a name, Public/Private → Publish Repository
Method 2: Git Mirror via Command Line
# 1. Clone from Bitbucket
git clone --bare https://bitbucket.org/username/repo.git
# 2. Mirror push to GitHub
cd repo.git
git push --mirror https://github.com/username/repo.git
# 3. Remove the temporary folder and clone from GitHub
cd ..
rm -rf repo.git
git clone https://github.com/username/repo.git
--bare — Git data only. --mirror — copies all branches, tags, and full history.
Method 3: GitHub Import
- Go to github.com/new/import
- Paste the Bitbucket URL
- If needed, enter credentials (App Password for Bitbucket with 2FA)
- Choose a repository name, Public/Private → Begin import
What Transfers
| Transfers | Does NOT transfer |
|---|---|
| Code | Issues |
| Commit history | Pull Requests |
| All branches | Pipelines |
| Tags | Wiki |
| Commit authors | Branch permissions |
After Migration
Set up GitHub Actions (replacing Bitbucket Pipelines):
# .github/workflows/ci.yml
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run tests
run: npm test
Update the remote for team members:
git remote set-url origin https://github.com/username/repo.git
git fetch
Also update: README links, CI/CD secrets, webhooks, documentation.
Platform Comparison
| Feature | Bitbucket | GitHub |
|---|---|---|
| Free private repos | ✅ | ✅ |
| CI/CD | Pipelines | Actions |
| Free CI/CD minutes | 50/mo | 2000/mo |
| Community | Smaller | 100M+ |
| Jira integration | Excellent | Available but weaker |
| Self-hosted | Bitbucket Server | GitHub Enterprise |
Common Issues
Authentication failed with 2FA: use an App Password instead of your regular password (Bitbucket → Personal Settings → App Passwords).
Large repository (> 1 GB): remove large files with git filter-branch or BFG Repo-Cleaner before migrating.
💬 Comments (0)
No comments yet
Be the first to share your opinion about this article!