V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
coolair
V2EX  ›  问与答

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

  •  
  •   coolair · Dec 7, 2017 · 5738 views
    This topic created in 3075 days ago, the information mentioned may be changed or developed.
    出现错误后,再次 push 就提示 Everything up-to-date,这个错误要紧么,会影响仓库的完整性么?
    以后会出现什么问题么?
    5 replies    2017-12-07 13:58:05 +08:00
    timwei
        1
    timwei  
       Dec 7, 2017
    看下 hint 呗

    有可能是你真的落后了,也有可能是你推送错分支了
    coolair
        2
    coolair  
    OP
       Dec 7, 2017
    @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  
       Dec 7, 2017
    @coolair

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

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

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

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

    不过看你贴的报错并不是一件事情
    Tink
        4
    Tink  
    PRO
       Dec 7, 2017 via iPhone
    我记得拉大仓库的时候容易出现这个问题
    coolair
        5
    coolair  
    OP
       Dec 7, 2017
    @Tink 这个后续对仓库会有影响么?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1298 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 17:37 · PVG 01:37 · LAX 10:37 · JFK 13:37
    ♥ Do have faith in what you're doing.