当前位置:   article > 正文

Git: remote: aborting due to possible repository corruption on the remote side. 的解决办法

remote: aborting due to possible repository corruption on the remote side.

问题概述

关于这个问题,博主是在项目开发过程中遇到的,写完一个功能模块后,在拉取更新提交代码时异常,

报:“ Git: remote: aborting due to possible repository corruption on the remote side.   ”,

如下图:

解决办法

根据错误提示内容,“GitLab客户端监测到本地有代码冲突,不能将冲突决策推送到服务端去解决,需要将代码拉取下来,在本地端进行冲突解决合并才能再次推送到远端代码服务器”,

处理办法,说出来很奇特,

点击错误提示框中的 “ Open Git Log ” 或者 “ Show Command Output ” 按钮,

这问题就解决了,点击以上两个按钮后,会看到同步和分支合并,

如下图:

具体内容如下:

  1. > git rev-parse --git-dir [93ms]
  2. Open repository: e:\**\**
  3. > git symbolic-ref --short HEAD [69ms]
  4. > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/dev refs/remotes/dev [53ms]
  5. > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [68ms]
  6. > git remote --verbose [67ms]
  7. > git config --get commit.template [50ms]
  8. > git ls-files --stage -- E:\MY_CODE\**\**\src\pages\**\**\components\RightContent.vue [44ms]
  9. > git cat-file -s ********44e159b3eca93633e287d***** [39ms]

到这儿,再进行 “ Pull ” 拉取代码的时候就可以了!!!

关于这个问题更深入的研究,博主没有再深入,项目时间比较紧。

但是一般如果提交失败,有两方面原因:

一个时代码冲突,导致无法提交代码的;

二一个就是GitLab上的文件损坏;


好了,关于 Git: remote: aborting due to possible repository corruption on the remote side. 的解决办法 就写到这儿了,如果还有什么疑问或遇到什么问题欢迎扫码提问,也可以给我留言哦,我会一一详细的解答的。 
歇后语:“ 共同学习,共同进步 ”,也希望大家多多关注CSND的IT社区。


作       者:华    仔
联系作者:who.seek.me@java98k.vip
来        源:CSDN (Chinese Software Developer Network)
原        文:https://blog.csdn.net/Hello_World_QWP/article/details/123007779
版权声明:本文为博主原创文章,请在转载时务必注明博文出处!
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/539073
推荐阅读
相关标签
  

闽ICP备14008679号