Created
November 10, 2015 10:09
-
-
Save maxweber/e5b9a608b2dd7297e913 to your computer and use it in GitHub Desktop.
Duplicates one complete git repo into another empty git repo. Based on https://help.github.com/articles/duplicating-a-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
#!/bin/bash | |
temp_dir=`mktemp -d -t repo` | |
echo $temp_dir | |
git clone --bare $1 $temp_dir | |
cd $temp_dir | |
git push --mirror $2 | |
rm -rf $temp_dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment