git过大超容量后怎么办?

git 提交了大文件,lfs 也没用了,显示

```
batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.
error: 推送一些引用到 **********:shiwanghua/ANN_VECTOR_RETRIEVAL.git' 失败
```

这时可以:

1. 用 `git reset --soft HEAD^` 撤回一次或多次 commit,修改的文件内容不会被撤销

2. 修改 .gitignore 文件,把某些不必要的大文件的相对路径加进去,表示不上传这些文件到github

3. 响应 .gitignore 的修改:git rm -r --cached .; git add .; git commit -m 'update .gitignore '

然后就可以 git push 了
全部评论
这样也可以啊
点赞
送花
回复
分享
发布于 2023-03-28 18:27 湖北

相关推荐

3 1 评论
分享
牛客网
牛客企业服务