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

环境

当前文件夹 d:\mygit\

 

clone到当前文件

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

 

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:\mygit\mytest\...(文件)
*/
posted @ 2018-03-27 23:09  简单随行  阅读(7442)  评论(1编辑  收藏  举报