How to Contribute to an Open Source Project on GitHub

38 minutes

“Feel free to submit a PR!” - words often found in GitHub issues, but met with confusion and fear by many. Getting started with contributing open source is not always straightforward and can be tricky. With this series, you’ll be equipped with the the tools, knowledge, and understanding you need to be productive and contribute to the wonderful world of open source projects. Much of this series speaks about GitHub, but most of the concepts are generally applicable to contributing to any open source project, regardless of where it’s hosted.

So enjoy the course and start contributing to the projects you use and love today!

pro-course-rss-logo

PRO RSS Feed

Introduction to GitHub

Exploring GitHub

Exploring a Repository

How to install Git SCM

How to authenticate with GitHub using SSH

Identifying How to Contribute to an Open Source Project on GitHub

How to Fork and Clone a GitHub Repository

Setting up the project locally

How to create a Pull Request on GitHub

How to Collaborate on a Pull Request on GitHub

How to update a Pull Request on GitHub

How to rebase a git Pull Request branch

How to squash multiple git commits

Getting a Pull Request Merged and Wrapping up

js tutorial about Introduction to GitHub

Introduction to GitHub

0:47 js

In this lesson we’ll talk about what GitHub is and how to sign up for a GitHub account so you can contribute to an open source project on GitHub.

js tutorial about Exploring GitHub

Exploring GitHub

1:47 js

GitHub adds a lot of great features on top of git repository hosting. We’ll take a look at some of these features including:

  • How to creating a repository and organization on GitHub
  • How to explore and find projects on GitHub
  • About GitHub gists
  • Searching pull requests and issues on GitHub
js tutorial about Exploring a Repository

Exploring a Repository

4:07 js

The basic unit of GitHub is a repository. This is where you code is stored and GitHub allows you to interact with others and with the code in great ways. In this lesson we talk about Watching, Staring, and Forking a repository. We also cover GitHub issues and pull requests and various other stats about a GitHub repository.

js tutorial about How to install Git SCM

How to install Git SCM

2:15 js

Let’s install the Git Source Control Management software so we can interact with repositories hosted on GitHub.

js tutorial about How to authenticate with GitHub using SSH

How to authenticate with GitHub using SSH

3:34 js

Anytime you push code to GitHub, you must be authenticated so GitHub knows you are authorized to make changes. In this lesson we’ll learn how to authenticate with GitHub using SSH so we don’t have to enter our username and password each time we push code to GitHub.

js tutorial about Identifying How to Contribute to an Open Source Project on GitHub

Identifying How to Contribute to an Open Source Project on GitHub

2:15 js

When you find a bug in an open source project, you know exactly the change you want to make. Other times you just want to find a way to contribute. Either way, you’ll need to know how to the project maintainers want to run the project and work with them to come up with an implementation for the fix/feature. And if you don't even know what project to start contributing to, check out this blogpost for inspiration on how to identify a good project to contribute to.

js tutorial about How to Fork and Clone a GitHub Repository

How to Fork and Clone a GitHub Repository

2:41 js

You cannot push code to repositories that you don’t own or have sufficient permission to. So instead, you make your own copy of the repository by “forking” it. You are then free to make any changes you wish to your repository.

js tutorial about Setting up the project locally

Setting up the project locally

1:18 js

Before you start making your change, you often need to set up your environment for the changes. This is where the repositories contributing instructions come in really handy. In this lesson we’ll get our environment setup and ready for changes.

js tutorial about How to create a Pull Request on GitHub

How to create a Pull Request on GitHub

6:19 js

Often when making a change, you want to verify your approach with the maintainer or ask them for help. In this lesson we’ll make a change and commit that WIP change. Then we’ll create a pull request requesting help from the project maintainer.

js tutorial about How to Collaborate on a Pull Request on GitHub

How to Collaborate on a Pull Request on GitHub

2:21 js

It’s not often that you’ll get a Pull Request on GitHub just right the first time you try. You generally will iterate with the project maintainer on your solution before your PR gets merged. In this lesson, we’ll explore some of the tools that projects use to manage contributions to open source projects on GitHub.

js tutorial about How to update a Pull Request on GitHub

How to update a Pull Request on GitHub

2:57 js

Once you’ve made your code updates locally, all you need to do is commit those changes and push that commit to your Pull Request branch. In this lesson we’ll also talk about how to skip git hooks that may be included in the project when you just need help.

js tutorial about How to rebase a git Pull Request branch

How to rebase a git Pull Request branch

3:39 js

Sometimes your Pull Request can fall behind master in a repository and occasionally that will result in merge conflicts which you have to manage yourself. In this lesson we’ll learn how to use git rebase to update our pull request branch to the latest version of master and resolve merge conflicts with git.

js tutorial about How to squash multiple git commits

How to squash multiple git commits

2:53 js

Often, project maintainers prefer that a single pull request be represented by a single commit. It makes the git history cleaner and easier to understand. So before your pull request is merged you’ll want to do an interactive git rebase to squash all of your commits and fix your commit message.

js tutorial about Getting a Pull Request Merged and Wrapping up

Getting a Pull Request Merged and Wrapping up

1:13 js

Let’s look at the GitHub commits and list of contributors now that our pull request has been merged. And we’ll wrap this series up with a few tips. Feel free to practice on stack-overflow-copy-paste, and see the Pull Request demonstrated in this lesson here.

Presented by:

Kent C. Dodds

a JavaScript developer who likes open source and teaching.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?