coolair
V2EX  ›  问与答

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

  •  
  •   coolair · Dec 7, 2017 · 6150 views
    This topic created in 3264 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
    timwei
    Dec 7, 2017
    1
    看下 hint 呗

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

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

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

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

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

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