Skip to content

Instantly share code, notes, and snippets.

@swanandmehta
Created November 15, 2021 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swanandmehta/865ad6a4b474275c3322e21b02e1f9bc to your computer and use it in GitHub Desktop.
Save swanandmehta/865ad6a4b474275c3322e21b02e1f9bc to your computer and use it in GitHub Desktop.
Migration from GIT to GIT
#!/usr/bin/env sh
echo Please provide git project old repo :
read oldRepo
echo Please provide git project new repo :
read newRepo
echo Please provide git project name :
read projectName
root="${projectName}_root"
mkdir -p $root
cd $root
git clone --mirror $oldRepo
cd $projectName
git push --mirror $newRepo
read -p "Press [Enter] key to quit the program."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment