Contributing to an Open Source Project on GitHub

Contributing to an Open Source project on GitHub can be a lot like working in a real world office. For example, one person may pull the code from a project and proceed to add a feature or fix a bug. Next, rather than push it back up, they create a pull request where the supervisor or another team member is able to verify the code, and if accepted pull it to the repository.

Now, you may be asking yourself, “What do pulling the code from a branch, and pull requests mean?” In this article I will go through the steps one goes through once you are ready to make changes to a project.

Pull request

A pull request allows you to let other members of the project know that you have pushed a branch. In the example above, this would be for the boss to go over what you have done. This is very useful because, if something is not right, or the boss needs more from the update, they can deny it for revisions.

After initializing a pull request, you’ll see a review page that shows a high-level overview of the changes between your branch (the compare branch) and the repository’s base branch. You can add a summary of the proposed changes, review the changes made by commits, add labels, milestones, and assignees, and @mention individual contributors or teams.

Pulling the Code from a branch

You can use a branch to isolate development work without affecting other branches in the repository. Each repository has one default branch, and can have multiple other branches. You can merge a branch into another branch using a pull request. You can use branches to: Develop features, fix bugs, or safely experiment with ideas that will not effect others’ work.

The user must have write access to a repository to create a branch, open a pull request, or delete and restore branches in a pull request. In repositories where you have owner or admin access, you can change the default branch.

 

Click here for more information on:

Pull Requests

Branches