Interview Prep/Git & GitHub/Remotes, Collaboration and Pull Requests

You are migrating a repo from Bitbucket to GitHub and must keep every branch and tag.

IntermediateScenarioRemotes, Collaboration and Pull Requests
Answer

Situation read → A normal clone only fetches some refs as local branches. A mirror copies everything.

What I'd do →

  1. git clone --mirror [email protected]:org/app.git && cd app.git.
  2. Create the empty repo on GitHub, then git push --mirror [email protected]:org/app.git.
  3. Large files above 100 MB will be rejected; convert them with git lfs migrate import first.
  4. Update CI, webhooks and local remotes: git remote set-url origin ....

Why → --mirror copies all refs exactly, including remote branches and notes.

Interview tip → Pull requests and issues do not travel with Git; use the GitHub Importer or API tools.

All Git & GitHub questions Roadmap: Git & GitHub

More on Remotes, Collaboration and Pull Requests