Last active
September 9, 2015 01:03
-
-
Save brigleb/da484f02afe74b0da58c to your computer and use it in GitHub Desktop.
Move a git file from one host to another
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 | |
# move_git - A script to move a repo from bitbucket to beanstalk | |
# Assumes you use a ~/Sites folder for these things, and are in it? | |
# Will leave behind a tarred zipfile of the repository. | |
# Note: Remember to create the repo in Beanstalk first! | |
# Usage: move_git.sh repo_name | |
git clone --mirror [email protected]:needmoredesigns/$1.git | |
cd ~/Sites/$1.git | |
git push --mirror [email protected]:/needmore/$1.git | |
cd ~/Sites | |
tar zcf $1.git.tgz $1.git/ | |
rm -rf ~/Sites/$1.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment