 
                    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!
 get the zine!
            
                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:
- Edit the files to fix the conflict
- git addthe fixed files
- git diff–check: check for more conflicts.
- git commitwhen you’re done. (or- git rebase --continueif 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!