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 →
git clone --mirror [email protected]:org/app.git && cd app.git.- Create the empty repo on GitHub, then
git push --mirror [email protected]:org/app.git. - Large files above 100 MB will be rejected; convert them with
git lfs migrate importfirst. - 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.
More on Remotes, Collaboration and Pull Requests
You are new to a team. How do you collaborate daily without stepping on others' toes?BeginnerYou want to contribute a fix to an open-source project you do not have write access to.BeginnerA teammate sent a 3,000-line PR and nobody can review it properly.IntermediateA reviewer asks for changes. How do you update the PR cleanly?BeginnerYour team wants stacked PRs so that large work arrives in small reviewable steps. How do you set it up?AdvancedWhy do you use `--force-with-lease`, and when does it still hurt?Intermediate