I'm trying to push my code to GitHub, but keep getting the following errors:
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. Should I somehow add these files to .gitignore, or is there another way to prevent them from being included in the push?
Thanks everyone!
CodePudding user response:
I don't think the Tabnine extension nor the .vscode-sever file should be getting to pushed to GitHub
Then use git filter-repo
(Python-based, must be installed first) to remove from your local repository history those folders (and their content).
Only once those folder and large content are no longer part of your local repository commits would you be able to push.
CodePudding user response:
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. 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
.