git提交大文件失败

╰半夏微凉° 2022-06-14 11:53 271阅读 0赞

50Mb push 警告

[plain] view plain copy

  1. remote: warning: Large files detected.
  2. # remote: warning: File big_file is 55.00 MB; this is larger than GitHub’s recommended maximum file size of 50 MB

100Mb push 限制

[plain] view plain copy

  1. remote: warning: Large files detected.
  2. # remote: error: File giant_file is 123.00 MB; this exceeds GitHub’s file size limit of 100 MB

移除大文件,注意备份。

[plain] view plain copy

  1. $git rm —cached giant_file
  2. # Stage our giant file for removal, but leave it on disk
  3. $git commit —amend -CHEAD
  4. # Amend the previous commit with your change
  5. # Simply making a new commit won’t work, as you need
  6. # to remove the file from the unpushed history as well
  7. $git push
  8. # Push our rewritten, smaller commit

发表评论

表情:
评论列表 (有 0 条评论,271人围观)

还没有评论,来说两句吧...

相关阅读

    相关 Git下载/提交文件

    ① 下载远程仓库分支代码:git clone git@gitlab.com:用户名/项目名.git ② 下载远程仓库指定分支代码:git clone -b 远程分支名称 g

    相关 idea 忽略文件git提交

    最近初学Git,而且在使用的IDE是IntelliJ IDEA,发现IDEA在提交项目到本地仓库的时候,会把.idea文件夹中的内容也提交上去,这里面放的是一些项目的配置信息,