Error while upgrading Github, pushing master

Asked

Viewed 112 times

1

I can’t update the master or merge with the master. I can move the project up to other branchs, master-b. But updating the master (push) gives this error:

NOTE: When trying to pull, this error occurs. git pull origin master

 * branch            master     -> FETCH_HEAD
fatal: refusing to merge unrelated histories

when trying to climb the master, git push origin master

! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:xxx/project.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

And when you merge, it appears this way.

inserir a descrição da imagem aqui

  • You do not need to put "solved" in the title. As the answer below has been accepted (marked with ) this is enough to indicate that it has been solved

1 answer

1


Hello,

Turns out on the branch master has new items that were not synchronized with your branch master local.

There in the error it says hint: 'git pull ...') before pushing again.

Just give git pull before giving git push for him to do the automatic merge or for you to do it manually :)

  • Yes, I’ve done it, and he gives this message: fatal: refusing to merge unrelated histories

Browser other questions tagged

You are not signed in. Login or sign up in order to post.