Last active
August 25, 2017 17:02
-
-
Save jwaldrip/8575006d8c6a32ed75bb to your computer and use it in GitHub Desktop.
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
randDir=/tmp/github-migrate/$(openssl rand -hex 16) | |
mkdir -p $randDir | |
read -p "Enter the github remote: " ghremote | |
read -p "Enter the stash remote: " stashremote | |
echo "" | |
echo "Pulling from $ghremote" | |
echo "" | |
git clone $ghremote --mirror $randDir | |
cd $randDir | |
echo "" | |
echo "Pushing to $stashremote" | |
echo "" | |
git remote set-url origin $stashremote | |
git push | |
rm -rf $randDir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment