git:clone 本地克隆的几种情况

环境

当前文件夹 d:mygit

clone到当前文件

git clone http://x.com/mytest.git
/*
结果:
会在当前文件夹下生成 mytest 默认文件夹
完整路径 d:mygitmytest...(文件)
*/

clone到指定文件夹

注意:请确保指定的的文件夹下没有其它文件,否则会提示错误信息。

git clone http://x.com/mytest.git "./"
/*
结果:
会直接将远程文件克隆在当前文件夹下
完整路径 d:mygit...(文件)
*/
git clone http://x.com/mytest.git "d:mygit2"
/*
结果:
会直接将远程文件克隆在指定文件夹下
完整路径 d:mygit2...(文件)
*/

clone指定分支

git clone -b branch_name http://x.com/mytest.git
/*
结果:
会在当前文件夹下生成 mytest 默认文件夹
完整路径 d:mygitmytest...(文件)
*/
原文地址:https://www.cnblogs.com/withme/p/8660945.html