博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
git 在非空文件夹clone新项目
阅读量:4589 次
发布时间:2019-06-09

本文共 312 字,大约阅读时间需要 1 分钟。

在非空目录下 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

转载于:https://www.cnblogs.com/nanyangzp/p/5919835.html

你可能感兴趣的文章
Java选择结构和数组
查看>>
14、通过jpa往数据库插数据
查看>>
2019牛客多校第二场E MAZE(线段树 + 矩阵)题解
查看>>
嵌套循环及例题
查看>>
c++ 使用WinHTTP实现文件下载功能
查看>>
一个分发复制+mirror的bug
查看>>
LeetCode 520 Detect Capital
查看>>
完全教程 Aircrack-ng破解WEP、WPA-PSK加密利器[zz]
查看>>
什么是C#
查看>>
从云计算到容器到容器云
查看>>
shell 分支/循环
查看>>
api服务端接口安全
查看>>
python中的time模块
查看>>
MyBatis-Plus的简单使用
查看>>
C++学习笔记-标准库类型-Vector类型
查看>>
Oracle 树操作(select…start with…connect by…prior)
查看>>
python中的operator.itemgetter函数
查看>>
h5新特性--- 多媒体元素
查看>>
jQuery实现发送短信验证码后60秒倒计时
查看>>
【CSS】盒模型+选择器(你选择的要操作的对象)
查看>>