Bugsy
Explains
3 hearts left

Merge conflicts

New idea

Two people, one line

You and Sara both branch from main. You change the heading in index.html to Learn Git fast. Sara changes the same line to Git for teams. You both commit, and then you merge Sara's branch.

Git compares each side with the commit where the branches split. If you changed different parts of the file, not right next to each other, Git takes both changes. But here both sides changed the same line in different ways (the same happens if one side deletes a file the other edited).

Which version is right? That's a question about meaning, and Git can't know what you meant. So it stops and asks you. This is a merge conflict. It isn't a crash or a broken project: it's Git refusing to guess.