reactjs .vs-code服务器/bin和tabnine扩展名尝试推送到GitHub,失败

wnavrhmk  于 2022-12-22  发布在  React
关注(0)|答案(1)|浏览(85)

我尝试将我的代码推送到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'

我认为Tabnine扩展名和.vscode-sever文件都不应该被推送到GitHub,而且我在其他项目中也从未遇到过这些错误。我是否应该将这些文件添加到.gitignore中,或者有其他方法可以阻止它们被推送到GitHub中?
谢谢大家!

thtygnil

thtygnil1#

我不认为Tabnine扩展名和.vscode-sever文件应该被推送到GitHub
然后使用git filter-repo(基于Python,必须先为installed)到remove from your local repository history those folders (and their content)
只有当那些文件夹和大容量内容不再是本地仓库提交的一部分时,您才能够推送。

相关问题