Last active
July 9, 2018 07:08
-
-
Save SWBSanjeewa/80591696b90839aeacbee7abecded860 to your computer and use it in GitHub Desktop.
Create new git repository from existing git 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
Clone original repository | |
Check current remote url | |
>git remote -v | |
Set new remote url | |
>git remote set-url origin <new_git_repo_url> | |
Push all branches to new repository | |
git push -u origin --all | |
Push all tags to new repository | |
git push origin --tags | |
Switch to another branch | |
git checkout origin/new_branch_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment