• 请不要在回答技术问题时复制粘贴 AI 生成的内容
sophymax
V2EX  ›  程序员

git 命令传输大文件失败后删除不掉那个大文件(执行过 git rm 了,但是之后的传输过程总会传这个大文件,也不知道是啥地方的)

  •  
  •   sophymax · Aug 25, 2014 · 4010 views
    This topic created in 4458 days ago, the information mentioned may be changed or developed.
    往 github 传文件,由于第一次用这玩意,传了个 400 多兆的文件试试看,接着传失败了,提示文件大小限制是 100M。不让传就不传吧,接着把那个有大文件的目录给 git rm -rf xxxxx,接下来我往上传任何东西都会有个传 400M 文件的过程,本地仓库明明已经删了,但是 commit、push 后总会有这个传大文件的过程,这是怎么回事
    7 replies  •  2014-08-26 04:32:04 +08:00
    kid813
    kid813
    Aug 25, 2014
    1
    把目录再add一次试试看呢?或者commit -a
    lichao
    lichao
    Aug 25, 2014
    2
    因为历史还在
    sophymax
    sophymax
    OP
    Aug 25, 2014
    3
    @lichao 那应该怎么弄呢?.....
    dullwit
    dullwit
    Aug 25, 2014❤️2
    4
    @kid813 别瞎忽悠,随便你checkout和reset文件都在
    $ git fsck #查看没有关联的松散对象
    $ git gc --prune=<date> #清除指定日期前的未关联的松散对象(当前也会清除reflog)
    dullwit
    dullwit
    Aug 25, 2014
    6
    不好意思
    $ git fack --no-reflogs #带这个参数才能查看reset的
    msg7086
    msg7086
    Aug 26, 2014 via iPhone
    7
    Undo commit
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3958 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 01:47 · PVG 09:47 · LAX 17:47 · JFK 20:47
    ♥ Do have faith in what you're doing.