转移git工程脚本
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
414 B

############################################################
#原工程地址
SRC_GIT=$1
#目标工程地址
DES_URL=$2
############################################################
git clone --mirror ${SRC_GIT} ./transdir.git
cd transdir.git
git config --bool core.bare false
git remote rm origin
git remote add origin ${DES_URL}
git push --all origin -u
git push --tags origin
cd ..
/bin/rm -rf ./transdir.git