共计 842 个字符,预计需要花费 3 分钟才能阅读完成。
Git Clone 的时候提示目录下存在文件
报错信息为:fatal: destination path ‘.’ already exists and is not an empty directory.
1、常用的方法就是把目录下的文件删除,然后重新 git clone,就可以 重新拉取 线上的库下来。
2、如果是需要把本地代码上传到线上。执行已下流程即可。
git init #初始化
git remote add origin (address) # 添加远程仓库地址
git add . #“.”表示添加本地所有代码
git commit -m "init" # 添加这次提交的备注信息
git push origin master # 提交到远程仓库
注:
如出现错误:
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'codeup.*************.git'
解决方案:
运行,合并后,在执行 git push文章来源:https://www.toymoban.com/diary/git/70.html
git pull --rebase origin master
文章来源地址 https://www.toymoban.com/diary/git/70.html
到此这篇关于怎么解决 fatal: destination path . already exists and is not an empty directory.?的文章就介绍到这了, 更多相关内容可以在右上角搜索或继续浏览下面的相关文章,希望大家以后多多支持 TOY 模板网!
原文地址:https://www.toymoban.com/diary/git/70.html
如若转载,请注明出处:如若内容造成侵权 / 违法违规 / 事实不符,请联系站长进行投诉反馈,一经查实,立即删除!
正文完