定制型網(wǎng)站開(kāi)發(fā)2345網(wǎng)址導(dǎo)航智能主板
如在使用Git過(guò)程中不小心將較大的二進(jìn)制文件加入倉(cāng)庫(kù),那么倉(cāng)庫(kù)大小很快就會(huì)超過(guò)規(guī)定的配額,在Push的時(shí)候會(huì)報(bào)下面的錯(cuò)誤:
remote: Powered by GITEE.COM [GNK-6.4]
remote: error: File: c91e5de4f55bedd0669db01036fc131ea8e516ce 130.66 MB, exceeds 100.00 MB.
remote: Use command below to see the filename:
remote: git rev-list --objects --all | grep c91e5de4f55bedd0669db01036fc131ea8e516ce
remote: Please remove the file from history and try again. (https://gitee.com/help/articles/4232)
?解決方案:
按照提示輸入命令查看存儲(chǔ)庫(kù)中的大文件
git rev-list --objects --all | grep c91e5de4f55bedd0669db01036fc131ea8e516ce
改寫(xiě)歷史,去除大文件
git filter-branch --tree-filter 'rm -f path/to/large/files' --tag-name-filter cat -- --all
git push origin --tags --force
git push origin --all --force