How to make your first pull request at Hacktoberfest
Tags: opensource
Published: 2022-10-11 23:58:23


by [Lawrence Franklin Chukwudalu](https://blog.openreplay.com/authors/lawrence-franklin-chukwudalu)






As a developer, you've probably used open-source tools, be it an IDE, a library, or even a simple package. Open-source software is everywhere and everything. 
Open source software is software whose source codes are freely available and have licenses that permit anyone to use, modify, or even share it. Almost all the tools developers use today are built on top of open-source software. These open-source tools/projects are built and maintained by developers as part of their day jobs, alongside their day jobs, on internships, or at hackathons, and one such hackathon is Hacktoberfest.

This tutorial will take you through a step-by-step guide on making your first pull request to an Hacktoberfest-labeled project on GitHub using Git.

## Some questions

The following questions are important.

- **What is Hacktoberfest?** [Hacktoberfest](https://hacktoberfest.com/) is an annual, month-long virtual festival that celebrates open-source software and encourages everyone who gets involved. It is for both young and experienced developers. Digital Ocean started it in 2014, where the whole month of October is dedicated to contributing to open-source projects. Hacktoberfest is a way to encourage the global community to help make the world of open-source software a better place.

- **What is Forking?** A [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo#:~:text=A%20fork%20is%20a%20copy,without%20affecting%20the%20original%20project.) is a copy of a repository— A directory or storage space where your projects can live. Forking a repository allows you to freely manipulate, modify and make changes to a project without affecting the original project itself. 

- **What is a Pull Request?** A [pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#:~:text=Pull%20requests%20let%20you%20tell,merged%20into%20the%20base%20branch.) is a way for developers/contributors to notify a project maintainer that they have completed a feature. It is known as a Merge Request on GitLab.

## Contributing to Hacktoberfest

What does it mean to contribute to Hacktoberfest? The good news is that everyone is welcome to participate in Hacktoberfest. Whether you're a developer, a designer, a writer, a translator, or pointing out problems or answering questions, you can give back to the open-source community during this year's Hacktoberfest.

To contribute to Hacktoberfest, you need to create four pull requests merged into public repositories marked as Hacktoberfest repositories in October (2022). You can participate by:

- **Writing**: You can participate in Hacktoberfest by writing and improving a project's documentation, starting a newsletter, or even writing tutorials for the project.
- **Helping**: You can also participate by answering questions on open issues, reviewing other contributors' code, and offering to mentor other developers
- **Coding**: This is the most popular and common way to contribute to Hacktoberfest and open source in general. You can solve open issues, provide new features, and improve tooling and testing on any Hacktoberfest-labelled project of your choice.
- **Designing**: You can design the layouts of a project to improve its user experience and usability at large. 




_<a href="https://github.com/openreplay/openreplay" target="_blank">OpenReplay</a> is an open-source, session replay suite that lets you see what users do on your web app, helping you troubleshoot issues faster. OpenReplay is self-hosted for full control over your data._

![OpenReplay](https://blog.openreplay.com/banner-blog_1oYPGT.png)

_Start enjoying your debugging experience - <a href="https://github.com/openreplay/openreplay" >start using OpenReplay for free</a>._



## Our first pull request to an Hacktoberfest labeled project

To create a pull request, you'll need a Git provider. You can use any Git provider like GitHub or GitLab. If you don't have an account with any of these, you can create one for [GitHub here](https://github.com/join) or [GitLab here](https://gitlab.com/users/sign_up). 

In this article section, I'll show you how to make a pull request on GitHub using Git. If you are not familiar with Git, refer to [this guide](https://git-scm.com/). 

### Finding a project
You can check out [here](https://github.com/topics/hacktoberfest) to see a list of Hacktberfest-labeled projects on GitHub, and [here](https://gitlab.com/explore/projects/topics/hacktoberfest) to see a list of Hacktoberfest-labeled projects on GitLab.

To save the stress, I already found a project marked Hacktoberfest on GitHub called [free-programming-books](https://github.com/EbookFoundation/free-programming-books)—A list of free learning resources in many languages. This project requires you (a contributor) to add free and valuable technical resources of any language to the existing list of other free resources. This project is devoted to promoting free ebooks' creation, distribution, archiving, and sustainability.

### Contribution guidelines
Most open-source projects have a contribution guideline and code of conduct for new and existing contributors. You must follow the contribution guideline provided by your project of choice to get your pull request merged. Here's the [contribution guideline](https://github.com/EbookFoundation/free-programming-books/blob/8fe40307efa75e540b1529de4d58c9d98b4cc46d/docs/CONTRIBUTING.md) for the project we'll be contributing to.

### Forking the repository
As stated earlier, forking a repository allows you to make changes to a project without affecting the original project. Let's go ahead and fork the free-programming-book repository.


![1](https://blog.openreplay.com/images/how-to-make-your-first-pull-request-at-hacktoberfest/images/image01.png)


To fork the repo, click the `fork` button and follow the prompts. This will create an instance of that entire repository in your account. 

### Clone the repository
Now that you have a copy of the repository in your account, clone it to your machine to work with it locally.
To clone, click on the `clone` button and copy the URL.


![2](https://blog.openreplay.com/images/how-to-make-your-first-pull-request-at-hacktoberfest/images/image02.png)


Open your terminal and run the following command. This will clone the repository to your local machine.

```
git clone https://github.com/Dalu46/free-programming-books.git
```

After cloning it, you have to go to the project folder using the following command:
```
cd free-programming-books
```

### Create a branch
[Git branches](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell) are a pointer to a snapshot of your changes. It's always a good practice to create a new branch when working with remote repositories, whether you want to make a minor bug fix or a major new significant feature. You can create a branch using the following command:
```
git checkout -b javascript-course
```

### Commit the changes
After creating a branch, you can now make your changes. For this article, I added a free Udemy course on JavaScript Fundamentals. You can see the changes I made on line `634 - 635`.

![3](https://blog.openreplay.com/images/how-to-make-your-first-pull-request-at-hacktoberfest/images/image03.png)


After making changes, next, we need to add the changes to the branch we just created using the [git add](https://www.atlassian.com/git/tutorials/saving-changes#:~:text=git%20ignore%20page.-,git%20add,until%20you%20run%20git%20commit%20.) command like so:
```
git add .
```

Next, we commit those changes using the [git commit](https://www.atlassian.com/git/tutorials/saving-changes/git-commit#:~:text=The%20git%20commit%20command%20captures,you%20explicitly%20ask%20it%20to.) command like so:
```
git commit -m "Added a JavaScript course titled JavaScript Fundamentals"
```

### Push the changes
After we've committed our changes, we now need to [push](https://www.atlassian.com/git/tutorials/syncing/git-push#:~:text=The%20git%20push%20command%20is,exports%20commits%20to%20remote%20branches.) the changes to the remote repository we forked:
```
git push -u origin javascript-course
```

### Make a pull request
Once we've successfully pushed, we can now go to the repository on GitHub, and we should see a button `Compare & pull request` and click it.

![4](https://blog.openreplay.com/images/how-to-make-your-first-pull-request-at-hacktoberfest/images/image04.png)



You'll be prompted to give details of the changes you just pushed to the repository (You can reference the issue using "#"). Now submit the pull request.
Congratulations! You've made your first pull request. If your pull request is accepted, you'll receive a mail.

## Conclusion

It's been a wonderful ride as we've reached this article's end. This article took you through a step-by-step guide on making your first pull request on Hacktoberfest 2022 while introducing you to some of the concepts of Git and open source. 
Hacktoberfest is your opportunity to jump into open-source, polish your skills, collaborate with developers worldwide, enhance your resumes, win the famous Hacktoberfest T-shirt, and give back to the developer community. Hacktoberfest is the easiest way to get into open source. Happy hacking!!

> A TIP FROM THE EDITOR: Contributing to open source is an important topic: please check out our [Getting Started With Open-Source: How To Contribute](https://blog.openreplay.com/getting-started-with-open-source-how-to-contribute/) and [4 Ways To Contribute To Open-Source Without Writing A Single Line Of Code](https://blog.openreplay.com/4-ways-to-contribute-to-open-source-without-writing-a-single-line-of-code/) articles for more help getting started.

<h2>Open Source Session Replay</h2> 



[![newsletter](https://blog.openreplay.com/newsletter_Z1P0UIP.png)](https://newsletter.openreplay.com/)