.vs / slnx.sqlite超过GitHub的文件大小限制100.00 MB

时间:2018-08-18 08:46:43

标签: git github visual-studio-code

我无法推送功能/租赁地图出现此错误:

! [remote rejected] feature/rental-map -> feature/rental-map (pre-receive hook declined)
error: failed to push some refs to 'git@github.com:saeefahmed/bwm-ng.git'

如何克服该错误消息?

1 个答案:

答案 0 :(得分:0)

这就是为什么Heroku reminds us to ignore such large files

git rm -f db/*.sqlite3
echo '*.sqlite3' > .gitignore
git add .gitignore
git commit -m "ignored sqlite databases"

但是,如果仍然不起作用,那么您需要从 all 提交中删除文件:我建议使用BFG Repo-cleaner

java -jar bfg.jar --strip-blobs-bigger-than 100M some-big-repo.git
cd some-big-repo.git
git reflog expire --expire=now --all && git gc --prune=now --aggressive

然后是git push --force,如果您是该仓库中唯一的仓库,则可以。

相关问题