Last active
November 28, 2017 12:34
-
-
Save 1000k/0979c45430eee7f8f01cea589391abee to your computer and use it in GitHub Desktop.
Gitリポジトリの中身を、ブランチとタグも含めて別リポジトリにコピーする ref: https://qiita.com/1000k/items/2a5dcda5fd41f38fd5d5
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 https://bitbucket.org/1000k/FOOBAR.git | |
cd FOOBAR/ |
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 branch -r | grep -v "\->" | grep -v master | while read remote; do git branch --track "${remote#origin/}" "$remote"; done | |
git fetch --all | |
git pull --all |
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 remote set-url origin https://github.com/1000k/FOOBAR.git | |
git push --all origin | |
git push --tags |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment