Skip to content

Instantly share code, notes, and snippets.

@anibalardid
Last active June 19, 2021 00:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anibalardid/c2837a8066fffafd7bbe991fd774b85b to your computer and use it in GitHub Desktop.
Save anibalardid/c2837a8066fffafd7bbe991fd774b85b to your computer and use it in GitHub Desktop.
Migrate from one git to another git repo #git

Migrar código de git de un repositorio a otro

Ejemplo para Migrar de bitbucket a github

git clone --mirror https://bitbucket.org/exampleuser/repository-to-mirror.git
# Make a bare mirrored clone of the repository
cd repository-to-mirror.git
git remote set-url --push origin https://github.com/exampleuser/mirrored
# Set the push location to your mirror
git push --mirror
  • Advertencias:
  1. Hay que usar https en vez de ssh (en el "HOST DESTINO")
  2. recordar poner el "--mirror" en el git clone, de lo contrario no sube los branches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment