Last active
February 7, 2024 10:37
-
-
Save T1T4N/03340d9c1a5385c1382dc076b5345160 to your computer and use it in GitHub Desktop.
Mirroring a git repository to Bitbucket
This file contains 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 --bare https://github.com/project/repo.git | |
cd repo | |
git push --mirror ssh://git@bitbucket/lib/new-repo.git | |
# if this results in the following error: | |
# You are attempting to update refs that are reserved for Bitbucket's pull request functionality. Bitbucket manages these refs automatically, and they may not be updated by users. | |
# remote: Rejected refs: | |
# remote: refs/pull-requests/1/from | |
# | |
# then use the following commands | |
git push ssh://git@bitbucket/lib/new-repo.git | |
git push --tags ssh://git@bitbucket/lib/new-repo.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment