Resolve Branch Has Conflicts When Merging GitHub Pull Request on Mac - VicPhanDevOps/mac GitHub Wiki
• The following resolution is for if the working branch has conflicts that must be resolved before your pull request can be merge.
•
• Go to the repository you’re working in in the Terminal, type git checkout main
and press the “return” key to check out the main branch.
•
• Type git pull
and press the “return” key to pull the latest code.
•
• Type git checkout < working branch >
and press the “return” key to check out the working branch that you’re using for the pull request.
•
• Type git merge main
and press the “return” key to merge the new code from the main
branch into the working branch.
•
• Type clear
and press the “return” key to clear the Terminal.
•
• Type git status
and press the “return” key to see any conflicts so you can resolve them.
•
• If the working tree is clean, then type git push and press the “return” key to push the changes.
•
• Return to GitHub and the pull request will be merged and closed.
•