0:00
/
Transcript

When a wetlab scientist needs to fix a merge conflict in git

They usually panic! But there's no need - this is what git is made for.

So you’re happily committing your code in git, maybe even using branches to organize and keep track of code, when all of a sudden you encounter a merge conflict - don’t panic!

Gif from The Office where Michael Scott comes out of his office terrified saying "Oh my god, it's happening!"

There are two primary ways that merge conflicts happen:

  1. You are trying to merge two branches that each made a change to the same line of some file

  2. You are trying to merge two branches that have a different history.

The second version really only happens when you start using a “remote” like github, so we’ll deal with that in a future video. For now, let’s take a look at the first example, and how to solve it.

Discussion about this video

User's avatar

Ready for more?