Back

How to make your first pull request at Hacktoberfest

How to make your first pull request at Hacktoberfest

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 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 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 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.

Session Replay for Developers

Uncover frustrations, understand bugs and fix slowdowns like never before with OpenReplay — an open-source session replay tool for developers. Self-host it in minutes, and have complete control over your customer data. Check our GitHub repo and join the thousands of developers in our community.

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 or GitLab here.

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.

Finding a project

You can check out here to see a list of Hacktberfest-labeled projects on GitHub, and here 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—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 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

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

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 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

After making changes, next, we need to add the changes to the branch we just created using the git add command like so:

git add .

Next, we commit those changes using the git commit 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 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

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 and 4 Ways To Contribute To Open-Source Without Writing A Single Line Of Code articles for more help getting started.

Gain Debugging Superpowers

Unleash the power of session replay to reproduce bugs and track user frustrations. Get complete visibility into your frontend with OpenReplay, the most advanced open-source session replay tool for developers.

OpenReplay