Created
June 8, 2017 13:44
-
-
Save yavuztas/ff763217b8b711bd1482c7b921ef1808 to your computer and use it in GitHub Desktop.
Git cloning bare repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone --mirror: to clone every references (commits, tags, branches) | |
git push --mirror: to push everything | |
That would give: | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment