Git Clone 的時(shí)候提示目錄下存在文件
報(bào)錯(cuò)信息為:fatal: destination path '.' already exists and is not an empty directory.
1、常用的方法就是把目錄下的文件刪除,然后重新 git clone ,就可以重新拉取線上的庫(kù)下來(lái)。
2、如果是需要把本地代碼上傳到線上。執(zhí)行已下流程即可。
git init #初始化 git remote add origin (address) # 添加遠(yuǎn)程倉(cāng)庫(kù)地址 git add . # “.” 表示添加本地所有代碼 git commit -m "init" # 添加這次提交的備注信息 git push origin master # 提交到遠(yuǎn)程倉(cāng)庫(kù)
注:
如出現(xiàn)錯(cuò)誤:
! [rejected] master -> master (fetch first) error: failed to push some refs to 'codeup.*************.git'
解決方案:
運(yùn)行,合并后,在執(zhí)行 git push文章來(lái)源:http://www.zghlxwxcb.cn/article/70.html
git pull --rebase origin master
文章來(lái)源地址http://www.zghlxwxcb.cn/article/70.html
到此這篇關(guān)于怎么解決 fatal: destination path . already exists and is not an empty directory.?的文章就介紹到這了,更多相關(guān)內(nèi)容可以在右上角搜索或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!