赞
踩
当gitee已经提交修改代码一次时候,显示仓库拒绝本地的提交的原因有以下:
基本含有非代码格式的其他文件,例如视频(真的,我是经过这次失败之后,才知道视频的内存占用量是真的大)
推送记录:
好的,意料之中,你果然不我果然被拒绝了(拒绝了好多次)
```html
remote: Powered by GITEE.COM [GNK-6.1]
remote: error: File: 23c0945f808a553c17c3d98b5bb7cb9f9d295556 202.31 MB, exceeds 100.00 MB.
remote: Use command below to see the filename:
remote: git rev-list --objects --all | grep 23c0945f808a553c17c3d98b5bb7cb9f9d295556
remote: Please remove the file from history and try again. (https://gitee.com/help/articles/4232)
error: failed to push some refs to 'https://gitee.com/2576619395/rehab-robot.git'
To https://
gitee.com/2576619395/rehab-robot.git
! refs/heads/test:refs/heads/test [remote rejected] (pre-receive hook declined)
Done
关键提示:
remote: git rev-list --objects --all | grep 23c0945f808a553c17c3d98b5bb7cb9f9d295556
remote: Please remove the file from history and try again. (https://gitee.com/help/articles/4232)
意思就是:
例如我的:
git rev-list --objects --all | grep 23c0945f808a553c17c3d98b5bb7cb9f9d295556
到对应文件夹下面运行指令
此时可以看到,我们找到了这个大文件。
此处实现了这一句提示:
remote: git rev-list --objects --all | grep 23c0945f808a553c17c3d98b5bb7cb9f9d295556
remote: Please remove the file from history and try again. (https://gitee.com/help/articles/4232)
点击这里的提示的网址:
(https://gitee.com/help/articles/4232)
会看到对应的操作,怎么从历史中删除文件,然后重新提交。
但是不幸的是,我这样操作了不行,但是这里还是提供思路。
就这样,耗了一上午以及半下午,最终采取第二个不得不的方法。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。