Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Welcome #1

Open
github-learning-lab bot opened this issue Jan 23, 2019 · 0 comments
Open

Welcome #1

github-learning-lab bot opened this issue Jan 23, 2019 · 0 comments

Comments

@github-learning-lab
Copy link

Welcome to Managing Merge Conflicts 馃帀

Hello, and welcome! If you're here to learn about and practice resolving merge conflicts, you're in the right place.

In this course, you'll learn why merge conflits happen by solving four merge conflicts. All of the merge conflicts in this course will be simple enough to solve from within the GitHub.com user interface, but if you'd prefer, you can solve them using the command line or other local tools.

As an added bonus, the project we are using for this course is a resume hosted on GitHub Pages! So, if you want to keep working after you complete this course, please feel free!

Note: You may notice that some branches and pull requests already exist. We'll be using them in later activities in this course.

How merge conflicts happen

Version control lets you make incremental changes to your code or file base while keeping the history. Git operates as a linked list, so a small history of three commits 馃摉 might look like this:

three commits in a linked list format

In the GitHub Flow, you...

  • first create a new branch 馃摉 off of the base branch, which is really just a reference point to a commit on the base branch.

add a branch

  • Next, you add one or more commits that, for now, exist only on your branch. The other commits stay fixed to their reference point in history.

branch with new commit

  • Finally, you open a pull request 馃摉 to propose that your new commits be included in the base branch, optionally add more commits, and then merge 馃摉 and delete your branch!

A Merge conflict occurs when someone else made a change on the base branch in the same file and location where you proposed changes. This usually happens when someone else merges in their branch before you merge yours.

This can be intimidating, but have no fear, Git knows how to handle this! It only needs a human to decide how to resolve the conflict.

Step 1: Create a Pull Request

Before we get too far ahead of ourselves, let's first practice making a simple change on a branch. Visualize your actions using the flow you reviewed above.

鈱笍 Activity: Create a normal pull request

  1. On the Code tab, click the _data/skills.yml file
  2. In the upper right corner of the file view, click the 鉁忥笍 icon to open the file editor
  3. In the file, add a skill or two that you're proficient in
  4. Scroll to the bottom of the page and select the option to "Create a new branch for this commit and start a pull request"
  5. Replace the default patch branch name with change-skills
  6. Select Propose file change
  7. In the "Leave a comment" field of the pull request, describe the change you made
  8. Click Create pull request
  9. 馃毀 Don't merge yet! 馃毀 Refresh the pull request to receive the next comment/instructions.

For a printable version of the steps in this course, check out the Quick Reference Guide.


Look for my next response in your pull request

Sometimes I respond too fast for the page to update! If you perform an expected action and don't see a response from me, wait a few seconds and refresh the page for your next steps.

jmazzotta pushed a commit that referenced this issue Jan 23, 2019
[Snyk] Fix for 2 vulnerable dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants