gitpractice.dev

brewly — Ch.5 · This branch has conflicts

Exercise 5 of 6

Before you start

Conflicts in a pull request

The service cannot choose between two versions of a line. You solve it on your computer: merge origin/main into your branch, decide with the buttons, commit and push.

Between <<<<<<< and ======= is your branch (current). Between ======= and >>>>>>> is what comes from main (incoming).

git fetch
get the new commits
git merge origin/main
meet the conflict
git status
what is left to do?
git add <file>
mark it solved
git commit
finish the merge; keep the message
git push
update the pull request
You can reopen this any time with “Lesson”.

Continue on a desktop

Typing git on a small screen is no fun. Open this page on a laptop or desktop to practise.

Back to the path