Skip to Content
Navigation:

A stick figure smiling

Here's a preview from my zine, Oh Shit! Git!! If you want to see more comics like this, sign up for my saturday comics newsletter or browse more comics!

Image of a comic. To read the full HTML alt text, click "read the transcript".

browse more comics! get the zine!
read the transcript!

Suppose you had main checked out and ran git merge feature-branch.

If that causes a merge conflict, you’ll see something like this in the files with conflicts:

<<<<<<< HEAD
if x == 0:
   return false
=======

(this is the code from main)

if y == 6:
   return true
elif x ==0:
   return false
feature-branch
>>> d34367

(this is the code from feature-branch)

To resolve the conflict:

  1. Edit the files to fix the conflict
  2. git add the fixed files
  3. git diff –check: check for more conflicts.
  4. git commit when you’re done. (or git rebase --continue if you’re rebasing!)

Smiling stick figure with medium length straight hair: You can use a GUI to visually resolve conflicts with git mergetool. Meld (meldmerge.org) is a great choice!

Saturday Morning Comics!

Want another comic like this in your email every Saturday? Sign up here!

I'll send you one of my favourite comics from my archives every Saturday.
© Julia Evans 2024 | All rights reserved (see the FAQ for notes about licensing)