【问题标题】:Cannot push branch in git [duplicate]无法在git中推送分支[重复]
【发布时间】:2021-02-04 16:01:59
【问题描述】:

我正在做关于 Ruby on Rails 的项目。尝试 git push 时无法将提交推送到 git,总是出现此错误:

Total 139 (delta 88), reused 0 (delta 0)
remote: Resolving deltas: 100% (88/88), completed with 19 local objects.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 58c751c4cd45f96f1386eb4f97b40fbf0308ae1434a6617d6c403bd8
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File public/uploads/tmp/1612375485-393249634478175-0006-2847/slack is 126.59 MB; this exceeds GitHub's file size limit of 100.00 MB

 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/*****

我试图在 tmp 文件夹中找到这个文件,然后删除。但我再次收到此错误

【问题讨论】:

标签: git github git-push


【解决方案1】:

你应该首先从你的 git repo 中删除这个文件。

https://devconnected.com/how-to-remove-files-from-git-commit/

因为它已经被隐藏并提交了。

如果需要,您可以将其保留在本地(完成后将其添加到忽略的文件中)

【讨论】:

  • 我使用 "git ls-files" 。列表中不包含此文件
猜你喜欢
  • 1970-01-01
  • 2012-03-17
  • 2018-06-21
  • 2019-08-10
  • 2016-02-24
  • 2020-10-14
  • 2019-02-13
  • 1970-01-01
  • 2014-03-15
相关资源
最近更新 更多