cd
/opt
git clone --no-checkout 仓库地址 .
/tmp
mv
.
/tmp/
.git ./本地仓库目录
rm
-rf .
./本地仓库目录
git reset --hard HEAD
git checkout branch_name