I have an existing git repository in Bitbucket. I want to clone everything, including tags and branches to another git repository, for example AWS CodeCommit. Use case is disaster recovery in the remote scenario that Bitbucket becomes inaccessible, or Atlassian suddenly goes bankrupt. What is the easiest way to do it?

Short Answer

git clone --mirror
cd upstream-repository.git
git push --mirror ssh://

Ardee Aram

Cloud Architect. Experienced Node.js Developer. Husband. Father. Problem Solver. Eternal Student of Life.