拉取 服务器上的 .git 包 到 tmp 目录 git clone --no-checkout 需要拉取的GIT地址 tmp 然后把 tmp 目录下的 .git 包覆盖掉当前的项目下 .git git reset --hard HEAD