We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

PRs from a Fork

When you fork someone's repository on a platform like GitHub, you get a copy of the repository in your account. This is the standard way to contribute to someone else's open-source project. The steps are typically:

  1. Fork their repo into your account
  2. Clone your fork to your local machine
  3. Create a new branch (let's call it your_feature)
  4. Make changes
  5. Commit and push changes to your fork's remote your_feature branch
  6. Create a pull request to original_owner/repo main from your_username/repo your_feature

Then the original owner can review your changes. If they like them, they can merge the changes straight from your fork into their repository.

Click to play video

Assignment

add myself as a contributor

We don't need the add_contrib branch anymore, so delete it from your local repo after switching back to main. Do NOT merge them.

Tip

To delete a branch locally while in a different branch use:

git branch -D branch_name

-D is the shortcut for --delete --force.