我有一个文件F
,超过了我尝试推送的100 MB限制。所以推送失败了。然后我删除了该文件,因为它无法推送并假定我需要再次执行add . ; commit
和push
。在自动生成的提交中,它表示deleted file F
。在push
上它仍然尝试上传该文件。好吧,所以我想我需要取消F
。所以我做了reset F
。我得到了消息fatal: ambiguous argument 'out': unknown revision or path not in the working tree.
不知道这意味着什么,所以我试图让git向我展示登台文件diff --cached
,但输出是空的。我对这种情况感到困惑,我怎么解决这个问题。git试图上传被暂存的已删除文件
回顾一下链:
$> git add. ; git commit
$> git push
$> remote: error: File F is 143.41 MB; this exceeds GitHub's file size limit of 100.00 MB
$> rm F
$> git add. ; git commit
$> git push
$> remote: error: File F is 143.41 MB; this exceeds GitHub's file size limit of 100.00 MB
$> git diff --cached
$>
你有你的大文件在一些较老的承诺。你需要重写历史来摆脱它。您可以随时使用'gitk'提供的图形界面检查您的本地历史记录。 'git log --name-only'也是你的朋友。使用git commit --amend或'git reabse -i'来重写历史记录。 –