Glossary

Merge conflict

When Git cannot combine two changes on its own and asks you to choose.

In plain words

A merge conflict happens when two branches changed the same part of the same file in different ways. Git stops, marks the spot in the file, and asks you to decide what the final version should be.

The file will contain markers like these:

<<<<<<< HEAD
Welcome to our shop
=======
Welcome to Ewoi's shop
>>>>>>> new-homepage

The top part is your current branch, the bottom part is the branch you are merging. Delete the markers, keep the text you want, save, then:

git add index.html
git commit
Ewoi

A conflict is not an error and nothing is lost. It is Git politely asking a question only a human can answer.

See Branches without fear.

Found this useful?

Every lesson stays free. Tap the thumbs up so we know what works, or say thanks with a soda or a coffee: it pays for hosting and new lessons.

Buy me a sodaBuy me a coffee

Want more on this?

Tell us which part was not clear, ask for a follow-up lesson, or request a lesson on any topic. We read every request.

I would like
Only to tell you when it is ready.

WhatsApp

Join the channelChat with us

Free lessons and updates in the channel. Questions about learning or training? Chat with us.