GitLab in bulk to replace the path and keep history

 

git-change-path.sh

#!/bin/bash
cat git-name.txt | while read line
do
   echo $line
git clone --mirror [email protected]:src/$line
cd $line 
git remote set-url --push origin [email protected]:dest/$line
git push --mirror  [email protected]:dest/$line
cd ..
done

 

git-name.txt

xxx.git // Keep line breaks

  

Guess you like

Origin www.cnblogs.com/zgz345/p/11493010.html
Recommended