Module 3 Exercise 2: Merge conflicts

(Rohith Pudari) #21

(Jake Hobbs) #22

No conflicts arouse

(Cwoods88keys) #23

(Theportablegeek) #24

Good Evening @mozzadrella! It seems that I dropped the ball and didn’t join a team with members but if you can reset I will attempt again. That said, here is the screenshot of my push to the repository.

(Charlotte Morrison) #25


Here is my screenshot- there were no conflicts.


(Dadremarie) #26

I should have made a new branch. Can you make a branch in

(Boydensuperstar) #27

(Ayush Bhardwaj) #28

(Kaushlendra Pratap) #29

(Amy Dickens) #30

Merge conflicts are tricky – forcing them to happen is even trickier :sparkles:

I did the steps and ended up with a push direct to master that went through no problemo :see_no_evil: - this is because with just insertions Git is intelligent enough to know to add these in. (pretty :cool: huh?)

The trick is to have two alternate versions of a file that you want to mix together, that’s where you’ll get a good amount of warning from Git and it will ask for human help in solving the conflict.

I did this by creating a branch locally, pushing that to the remote, then changing the file on the master branch using the web UI. After this I made a pull request between the new branch and master (as I knew that these would clash).

Here is screen shot one where I just replaced something:

Here is what my PR merge conflict looked like:

Here is my commit history after resolving the conflict:

I have a blog post about merge conflicts and how to resolve them here :sparkles:

(Chad Purdy) #31

I was able to push with no merge conflicts to resolve, and since I didn’t use a separate branch, there was no pull request needed either.

(Max Hudnell) #32

my commit showing my edit!

(Rishabh Bansal) #33

Hi @mozzadrella, This is my Module 3.2 exercise submission. ! :smile:

(Chris Cannon) #34

This looks fine @theportablegeek!

(Chris Cannon) #35

This is a great exercise to do with students in class, so the first time they see on on their own they are prepared! (Or at least not scared :wink:) :100:

(Ygor Canalli) #36

(Eduardo Gutierrez) #37

Well i suppose id repeat this assignment later, i couldn find any Team to join, so i created my own Team…Dont know why seems default teams are secret and not visible or public.

No mege conlicts then…It seems strange as we are editing and working in the same line. When we changed the line for example *Name by the line *Name: Eduardo … it should arise some merging problems, but github delete the first line and then add the second one, so no confilct arises.

(Randy Johnson) #38

(Benjamin Soltoff) #39

(Docmilo) #40

My solution to the Merge conflicts exercise: