📝 Git & GitHub

Migrating from Bitbucket to GitHub

P
Author
Pyland
📅
Published
06.05.2026
⏱️
Reading time
1 min
👁️
Views
166
📊
Level
Article

Also update: README links, CI/CD secrets, webhooks, documentation.

Method 1: Via GitHub Desktop

  1. Open GitHub Desktop: File → Clone Repository → URL
  2. Paste the Bitbucket repository HTTPS URL → Clone
  3. After cloning, click Publish repository
  4. 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

  1. Go to github.com/new/import
  2. Paste the Bitbucket URL
  3. If needed, enter credentials (App Password for Bitbucket with 2FA)
  4. 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.

Your reaction to the article

💬 Comments (0)

🔐 Sign in to leave a comment
🚪 Login
💭

No comments yet

Be the first to share your opinion about this article!

🔗 Similar

Similar articles

Continue learning with these materials

📝

Your First Git Commit

Git will create a hidden .git folder — everything is stored there.

📅 30.06.2026 👁️ 108
📝

Git Hosting Platforms

GitHub, GitLab, Bitbucket — key differences and recommendations.

📅 06.05.2026 👁️ 299
📝

What Is a Git Commit and Why Do You Need It? 📸

A commit is a saved snapshot of your project at a specific point in time...

📅 06.05.2026 👁️ 160

Did you like the article?

Subscribe to our updates and receive new articles first. Grow with PyLand!