码迷,mamicode.com
首页 > 其他好文 > 详细

如何在非空目录下 git clone 项目

时间:2015-04-27 00:04:14      阅读:193      评论:0      收藏:0      [点我收藏+]

标签:

在非空目录下 git clone 项目时会提示错误信息:

fatal: destination path ‘.‘ already exists and is not an empty directory.

解决办法:

1. 进入非空目录,假设是 /dir/jk1

2. git clone --no-checkout https://git.oschina.net/jankerli/test.git tmp

3. mv tmp/.git .   

4. rmdir tmp

5. git reset --hard HEAD

如何在非空目录下 git clone 项目

标签:

原文地址:http://www.cnblogs.com/jankerli/p/4458632.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!