search

Home  >  Q&A  >  body text

git push prompts that the latest commit of the current branch lags behind the corresponding remote branch

As the title says, push always prompts me with this error, but I can be sure that I have merged the latest code, and even if I re-clone the latest code, I will still be prompted to lag behind the remote when I push at the end. Branch

phpcn_u1582phpcn_u15822791 days ago657

reply all(1)I'll reply

  • 怪我咯

    怪我咯2017-05-02 09:47:27

    Back up a branch first git checkout -b master_bak
    Delete git branch -D master
    Re-pull git fetch origin master:master
    git checkout master
    git merge master_bak
    git push origin master

    reply
    0
  • Cancelreply