Second merge: Let's try a conflict#1
Open
github-learning-lab[bot] wants to merge 1 commit intomasterfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 3: Resolve a simple conflict
You may merge a lot of pull requests before you encounter your first merge conflict. That’s because Git is really smart when it comes merging. However, most of the time, you won't know you have a conflict until you create the pull request.
This branch is a great example. In this scenario, two of our friends have been working in this repository. They both created branches, changed the
_config.ymlfile and opened pull requests. One pull request merged in to master without any problem, but now the other pull request shows a conflict.The history of master and this branch look something like this:
However, since this pull request also changes the same lines in the
_config.ymlfile, there is a merge conflict.Let's help our friends resolve this conflict.
⌨️ Activity: Resolving your first conflict
Here's how you can fix this merge conflict:
In the "This branch has conflicts that must be resolved" section of the Pull Request (below, keep scrolling), click the Resolve conflicts button.
Look for the highlighted sections that begins with
<<<<<<< update-configand ends with>>>>>>> master. These markers are added by Git to show you the content that is in conflict.Remove the changes made on the master branch by deleting all of the content below the
=======and above>>>>>>> master.Next, remove the merge conflict markers by deleting the following lines:
Optional: If you're thinking about using this resume, you can edit the
_config.ymlfile with your own information now. Change any of the lines within the file, even outside of where the markers were. More about this below.With the merge conflict markers removed, click Mark as resolved.
Finally, click Commit merge.
Watch below for my response