V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
coolair
V2EX  ›  问与答

git push 的时候经常会出现“error: failed to push some refs to ...”的错误,要紧么?

  •  
  •   coolair · 2017-12-07 12:08:45 +08:00 · 5248 次点击
    这是一个创建于 2341 天前的主题,其中的信息可能已经有所发展或是发生改变。
    出现错误后,再次 push 就提示 Everything up-to-date,这个错误要紧么,会影响仓库的完整性么?
    以后会出现什么问题么?
    5 条回复    2017-12-07 13:58:05 +08:00
    timwei
        1
    timwei  
       2017-12-07 12:18:16 +08:00
    看下 hint 呗

    有可能是你真的落后了,也有可能是你推送错分支了
    coolair
        2
    coolair  
    OP
       2017-12-07 12:29:51 +08:00
    @timwei 分支没错。
    昨天一个错误提示:
    fatal: protocol error: bad line length character: Remo
    error: error in sideband demultiplexer

    今天推送到一个新的远程仓库错误提示:
    remote: error: cannot lock ref 'refs/heads/master': reference already exists

    落后指的是啥,望指教,谢谢。
    timwei
        3
    timwei  
       2017-12-07 13:00:47 +08:00
    @coolair

    看这报错,并不是我原本想的

    我原本看描述,以为是 push.default 设定了 matching 的锅( 1.x 版默认)

    matching 下 git push 意外的多推送了别的落后分支,所以显示了"“ error: failed to push some refs to ...”

    而正确的分支则成功推送,所以第二次 push 显示包含了 Everything up-to-date

    不过看你贴的报错并不是一件事情
    Tink
        4
    Tink  
       2017-12-07 13:01:12 +08:00 via iPhone
    我记得拉大仓库的时候容易出现这个问题
    coolair
        5
    coolair  
    OP
       2017-12-07 13:58:05 +08:00
    @Tink 这个后续对仓库会有影响么?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   812 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 22:25 · PVG 06:25 · LAX 15:25 · JFK 18:25
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.