22

I merged a PR with the GitHub web interface, which resolved in a successful merge commit.

Afterwards, GitHub is complaining This branch has conflicts that must be resolved. Does anybody know why or how to get the status merged?

Community
  • 1
  • 1
Dan
  • 787
  • 1
  • 7
  • 20

2 Answers2

41

You'll need to update your branch with new commits from master, resolve those conflicts and push the updated/resolved branch to GitHub.

git checkout master
git pull
git checkout <branch>
git merge master
[ ... resolve any conflicts ... ]
git add [files that were conflicted]
git commit
git push
Smbat Poghosyan
  • 719
  • 7
  • 20
  • Thank you for your help. Which brach do I have to check out the after master, @Smbat Pogosyan ? – Dan Jun 20 '19 at 11:23
  • 1
    To branch which you want to merge with master, I think. – Smbat Poghosyan Jun 20 '19 at 11:28
  • 2
    I don't know why, but after merging master into RP-branch and merging RP again into master it worked. Now I merged the RP two times but at least Github isn't nagging anymore. – Dan Jun 20 '19 at 11:38
0

UPDATE 2022

I used help on the top but i get some git error !

I think was for new updates git !

so, I run this commands :

git checkout <branch> 

Like : git checkout origin/main

git pull  <repository link when you forked>
git checkout <branch> 
git merge <branch> 

And now go to file and check your change!

git add
git commit

or

git commit -m "commit"

If your needed Signed-off-by: use ( -s ).

Finally:

git push origin HEAD:<name-of-remote-branch>
F.S
  • 98
  • 8