10 simple steps for committing to an open source project (for beginners)

All you need to know for getting started.

github
git
open source

Contributing to open source projects has a lot of benefits. It helps the community out, provides a great way to practice and improve your skillset and also looks great on your CV.

It can however appear daunting for beginners to get started. To help with this, I have outlined 10 simple steps you will need to complete in order to commit your first PR. I hope this will simplify the process for some of you.

Steps

  1. Find your favourite open source project.

    • There a literally thousands to choose from, so there is no excuses here.
    • Think of any pip module, gem or npm package you have recently used in a project.
    • If you are still unsure, checkout this awesome repo.

media/github.png

  1. Look through the issues tab and find one that suits - bugs and documentation tasks can be the easiest to start with.
  2. Once you have found a project with some issues to tackle, it is time to fork the repository in Github - this will copy the project to your own account.

media/fork.png

  1. Clone the repository to your local machine - you can use either SSH or HTTP methods

    git clone git@github.com:ThomasMoran/devicon.git
  2. Get the project running locally

    • Check out the projects README.md which will usually contain this information.
    • Some projects will naturally be more difficult to set up than others so don’t give up here!
  3. Create a new branch - be careful to start from the correct development branch (this is the one you will try to merge back into later)

    git checkout -b "my-branch-name"
  4. Make your changes

  5. Commit your work and push - this push will go to your forked version of the repository.

    git commit -m "I have not broken anything here. I promise."
    
    git push origin my-branch-name
  6. Open a new Pull Request

    1. Go to your forked repo and click on Pull Requests

    media/pull-request-button.png

    1. You will merge from the new branch in your forked repo (marked head repository) into the develop branch of the main repo (marked base repository). You can see how clear this is in the below image.

    media/pull-request-merge.png

    1. Make sure you fill out the PR description as required by the project.
    2. Click create pull request and that’s it, now wait for feedback and merging.
  7. Once the code is approved, you’re done!! No better feeling than praise from the maintainers.

media/feedback.png

Hi, I'm Tom

I’m a Software Developer and Engineering Advocate current working for Deloitte Digital in Ireland. If you are one of the lucky ones to land here, please sign my Guestbook.