GitLab中批量更换路径并保留历史记录

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 // 请保留换行

  

猜你喜欢

转载自www.cnblogs.com/zgz345/p/11493010.html