Hacktoberfest 2019 – let’s contribute to open-source
Tags: articles, tutorial, development, hacktoberfest
Published: 2019-10-08 06:24:53

---
title: Hacktoberfest 2019 – let’s contribute to open-source
published: true
date: 2019-10-07 15:09:23 UTC
tags: Articles,Tutorial,development,hacktoberfest
canonical_url: https://42coders.com/hacktoberfest-2019-lets-contribute-to-open-source/
---

## Introduction

[Hacktoberfest](https://hacktoberfest.digitalocean.com/) is an initiative organized by [DigitalOcean](https://www.digitalocean.com/) and [DEV.to](https://dev.to/), with the goal to involve more developers into the open-source development to improve and fix open-source projects.

## Why?

**Because:**

- we use a lot of open source software in our daily work, developers’ lives would be much harder without open source
- It is **fun** to contribute, and give back to the community
- You can build your own **reputation** as a developer, and your company’s reputation as well
- Last but not least, you can earn a hacktoberfest **T-shirt** 🙂

## How?

#### Find a project

Every public repository on GitHub will do, but you can find some projects on the Hacktoberfest’s webstite [here](https://hacktoberfest.digitalocean.com/), and also you can search for issues on [GitHub](https://github.com/search?q=label%3Ahacktoberfest+state%3Aopen&type=Issues) labeled with Hacktoberfest.

#### Fork the project

You shouldn’t clone the original repository, but create a fork from the project. It is easy to do on GitHub, just click on the Fork button after opening the repository:

![](https://42coders.com/wp-content/uploads/2019/10/Screen-Shot-2019-10-07-at-4.25.49-PM-1024x114.png)

When the fork has been created, you can clone your own fork:

![](https://42coders.com/wp-content/uploads/2019/10/Screen-Shot-2019-10-07-at-4.29.08-PM-1024x332.png)

Depending on the project you might need to do some set up and initialization, for example:

- composer install
- npm install
- npm run dev
- etc

#### Write tests

Usually open-source project already have test framework installed, and already have tests. Depending on the project it might be phpunit, codecept, jasmine, jest, junit or any other. As a first step create a failing test, which reproduces the issue you want to fix. It is a important step, so the maintainer of the project can reproduce the issue, and see if your fix is appropriate, and last but not least the test ensures that the changes made later would not break your fix.

![](https://42coders.com/wp-content/uploads/2019/10/Screen-Shot-2019-10-07-at-4.32.23-PM.png)

Fix the issue, make your test pass, but run all the tests before creating the pull request and make sure they all pass.

![](https://42coders.com/wp-content/uploads/2019/10/Screen-Shot-2019-10-07-at-4.34.50-PM-1024x107.png)

#### Create a pull request

When the changes are done, the tests pass, commit and push your changes to your fork. Create a pull request to the original repository, to let the maintainer know, you fixed the issue and want to contribute.

![](https://42coders.com/wp-content/uploads/2019/10/Screen-Shot-2019-10-07-at-4.37.53-PM-1024x119.png)

If everything went well and your changes can be merged to the original repository without any conflicts, you can create the pull request:

![](https://42coders.com/wp-content/uploads/2019/10/Screen-Shot-2019-10-07-at-4.39.08-PM-1024x372.png)

#### Reference the issue

On GitHub you can reference the issue by using the following keywords in your commit or pull request messages:

- close
- closes
- closed
- fix
- fixes
- fixed
- resolve
- resolves
- resolved

Using one of these keywords the issue will be closed automatically when the pull request is approved.

For example: **This PR fixes #12.**

You can find more info on this topic on GitHub’s help page [here](https://help.github.com/en/articles/closing-issues-using-keywords).

## When? NOW!

When should we do it? The general answer is always :-), but especially NOW, the Hacktoberfest is already started and it lasts in whole October. You need to create 4 pull requests to open source repositories and if the maintainer doesn’t mark it as spam, you will be eligible to participate. The first **50.000** participants will earn a **T-shirt.**

**Let’s go hacking!**

The post [Hacktoberfest 2019 – let’s contribute to open-source](https://42coders.com/hacktoberfest-2019-lets-contribute-to-open-source/) appeared first on [42 Coders](https://42coders.com).