目錄
一、解決fatal: detected dubious ownership in repository at 'D:/resource/git項目'
二、解決error: failed to push some refs to 'https://gitee.com/yantianzi/roadlink'hint: Updates were rejected because the remote contains work that you do
一、解決fatal: detected dubious ownership in repository at 'D:/resource/git項目'
報錯:
解決方法:注意看紅框提示 只需要再輸入上面的命令即可,
git config --global --add safe.directory "xxxxxxx";
?ok,解決。
二、解決error: failed to push some refs to 'https://gitee.com/yantianzi/roadlink' hint: Updates were rejected because the remote contains work that you do
報錯:
原因:可能是因為在手動修改了遠程倉庫中的文件,導致一些文件在本地倉庫和遠程倉庫上不一致,故而引發(fā)該錯誤。當然也有可能是別的原因哦,這個原因的可能性比較大?。?!
解決方法:使用命令 git pull --rebase origin master
將遠程倉庫同步到本地,然后再重新add、commit、push就行了。當然引發(fā)這種錯誤的原因可能不是這個,但大家可以嘗試一下。
然后,我們登錄gitee,遠程倉庫查看,成功上傳,
?ok,成功解決了錯位,問題解決。文章來源:http://www.zghlxwxcb.cn/news/detail-605524.html
?文章來源地址http://www.zghlxwxcb.cn/news/detail-605524.html
到了這里,關(guān)于使用git時出現(xiàn)的一些問題整理的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!