V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
sophymax
V2EX  ›  程序员

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

  •  
  •   sophymax · Aug 25, 2014 · 3784 views
    This topic created in 4263 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
        1
    kid813  
       Aug 25, 2014
    把目录再add一次试试看呢?或者commit -a
    lichao
        2
    lichao  
       Aug 25, 2014
    因为历史还在
    sophymax
        3
    sophymax  
    OP
       Aug 25, 2014
    @lichao 那应该怎么弄呢?.....
    dullwit
        4
    dullwit  
       Aug 25, 2014   ❤️ 2
    @kid813 别瞎忽悠,随便你checkout和reset文件都在
    $ git fsck #查看没有关联的松散对象
    $ git gc --prune=<date> #清除指定日期前的未关联的松散对象(当前也会清除reflog)
    dullwit
        6
    dullwit  
       Aug 25, 2014
    不好意思
    $ git fack --no-reflogs #带这个参数才能查看reset的
    msg7086
        7
    msg7086  
       Aug 26, 2014 via iPhone
    Undo commit
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3133 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 14:40 · PVG 22:40 · LAX 07:40 · JFK 10:40
    ♥ Do have faith in what you're doing.