Last active
April 30, 2020 13:29
-
-
Save Abdelkrim/a8ed75bc72a8a5af6fb211f40a9ca549 to your computer and use it in GitHub Desktop.
git: move project from one repository to another one (bitbucket, github, gitlab)
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
# copy a repository and its tags into a second, third repositoty | |
# (c) Abdelkrim Boujraf, http://www.alt-f1.be | |
# Imagine that your original repository is on bitbucket.org | |
git@bitbucket.org:alt-f1.be/data_visualization.git | |
# ADD REMOTE PUSH URL's for gitlab and github | |
# It will change the remote.origin.pushurl config entry. | |
# Now pushes will send to both of these destinations, rather than the fetch URL. | |
# https://gist.github.com/rvl/c3f156e117e22a25f242 | |
git remote set-url --add --push origin git@github.com:alt-f1.be/data_visualization.git | |
git remote set-url --add --push origin git@gitlab.com:alt-f1.be/data_visualization.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NOT SURE IF THE FOLLOWING COMMANDS ARE STILL USEFUL
Add GITHUB.COM
git remote add github git@github.com:alt-f1.be/data_visualization.git
Add GITLAB.COM
git remote add gitlab git@gitlab.com:alt-f1.be/data_visualization.git
#bitbucket
git push -u bitbucket --all
git push -u bitbucket --tags
#github
git push -u github --all
git push -u github --tags
#gitlab
git push -u gitlab --all
git push -u gitlab --tags