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

相关文章:

  • 2021-11-11
  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
  • 2021-08-26
猜你喜欢
  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
  • 2022-12-23
相关资源
相似解决方案