[英].vs-code server/bin and tabnine extension trying to push to GitHub, failing
I'm trying to push my code to GitHub, but keep getting the following errors:我试图将我的代码推送到 GitHub,但不断收到以下错误:
remote: warning: File .vscode-server/bin/e4503b30fc78200f846c62cf8091b76ff5547662/node is 75.64 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: error: Trace: 0d8800fdb9c63ca4691425c2af625642fe616e4fc3de1320cdb47e20a5fc07bf
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File .local/share/TabNine/models/ce94127b.tabninemodel is 241.05 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
To https://github.com/elilogbro/p-rails.git
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/elilogbro/p-rails.git'
I don't think the Tabnine extension nor the.vscode-sever file should be getting to pushed to GitHub and I've never encountered these errors on other projects I've done.我不认为 Tabnine 扩展和 .vscode-sever 文件应该被推送到 GitHub,而且我在我完成的其他项目中从未遇到过这些错误。 Should I somehow add these files to.gitignore, or is there another way to prevent them from being included in the push?
我应该以某种方式将这些文件添加到 .gitignore,还是有其他方法可以防止它们被包含在推送中?
Thanks everyone!感谢大家!
After a week of dealing with this issue, I found out that I had accidentally git init
a level above my repo, so my entire directory was trying to push to GitHub.在处理这个问题一周后,我发现我不小心在我的 repo 之上进行了
git init
,所以我的整个目录都试图推送到 GitHub。 To fix the issue, in my directory i git remote remove origin
, then cd'd into my project folder, git init, git add., git commit -m, and git push -u origin main
.要解决此问题,我在我的目录中执行
git remote remove origin
,然后将git init, git add., git commit -m, and git push -u origin main
CD 到我的项目文件夹中。
I don't think the Tabnine extension nor the.vscode-sever file should be getting to pushed to GitHub
我不认为 Tabnine 扩展和 .vscode-sever 文件应该被推送到 GitHub
Then use git filter-repo
(Python-based, must be installed first) to remove from your local repository history those folders (and their content) .然后使用
git filter-repo
(基于 Python,必须首先 安装)从本地存储库历史记录中删除这些文件夹(及其内容) 。
Only once those folder and large content are no longer part of your local repository commits would you be able to push.只有当这些文件夹和大内容不再是本地存储库提交的一部分时,您才能推送。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.