目录
一、解决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
报错:
原因:可能是因为在手动修改了远程仓库中的文件,导致一些文件在本地仓库和远程仓库上不一致,故而引发该错误。当然也有可能是别的原因哦,这个原因的可能性比较大!!!
解决方法:使用命令 git pull --rebase origin master
将远程仓库同步到本地,然后再重新add、commit、push就行了。当然引发这种错误的原因可能不是这个,但大家可以尝试一下。
然后,我们登录gitee,远程仓库查看,成功上传,
ok,成功解决了错位,问题解决。文章来源:https://www.toymoban.com/news/detail-605524.html
文章来源地址https://www.toymoban.com/news/detail-605524.html
到了这里,关于使用git时出现的一些问题整理的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!