A Beginner's Guide to Your First Open-Source Contribution Using This Repository

I get questions/comments all the time, like:

"How do I make my first open-source contribution?"

"Where do I find open source projects?"

"I don't know how to do open source."

Well, that stops today! 🛑

With this article, you should be able to follow along and make your very first contributions to open-source.

Here is a beginner-friendly repository that you can follow along with and start earning those little green boxes on GitHub!

The project aims to list good free developer resources to share with other coders. But we also want to make it a worthwhile first project for you to contribute.

All you need is a resource that you've used for learning that you can add to the list.

If you are drawing a blank, ask us in the comments, and we will give you one.

If you have no idea, do a Google search, and I'm sure you'll find something to add to our list to keep it helpful.

🔗 https://github.com/codu-code/free-developer-resources

We won't cover all the nuances of open-source in this article, but it's meant to be a walkthrough to get through your first contribution to open-source.

It should take you about 30 minutes or less if you follow these steps. So grab a coffee and jump in! ☕️

Skills required

  • Ability to update a markdown text file.
  • It would help to have some git experience. If you have neither, we have the commands and tips to help you along in this article. So dive in! The best way to learn is by doing.

Need help?

Sign up for an account here on Codú, and we will email you an invite to our Discord.

Ask us for help or clarifications in the "code-questions" channel. Just reference this article.

Let's get started!

When you first find a repository, you'll usually find README.md that you can expect to help you get up and running with the project.

Set Up Your Environment

If you already have git configured, you can skip this section.

Install git

If you aren't sure if you have git installed, run this command first:

git -v

It checks the version of git, and you'll get an error of "the command not being found" if you don't have git installed.

If you haven't installed git, you can download and install it from here.

Configure Git

Once git is installed, you can configure your name and email. This should be your GitHub username and email.

Run this command with your GitHub details:

git config --global user.name "yourusername"
git config --global user.email "youremail@example.com"

Fork the Repository

  • Navigate to this repository on GitHub.
  • Click the "Fork" button on the upper right-hand corner of the repository's page. This creates a copy of the repository in your GitHub account.

A screenshot showing where the fork button is on the GitHub page

Clone Your Forked Repository

You should have the forked repository under your own username now. To confirm, go to your profile and look for the free-developer-resources.

If you found it, you are ready to clone it!

Open a terminal or command prompt and run this command replacing your:

git clone https://github.com/YOUR_GITHUB_USERNAME/free-developer-resources.git

Create a New Branch

As a rule of thumb, never use your default branches for changes.

Once you have navigated to your repository in the terminal, create a new branch. Here's an example of how:

git checkout -b docs/new-resource

Now you can make your changes.

Make Your Changes

Now, you can make the desired changes to the code or documentation. Use your preferred text editor or IDE for this.

Open the README.md file.

Have a quick look and try to place it in the appropriate section.

Add to the correct section and in alphabetic order.

The update should be a markdown URL, which will consist of the resource name and link to the resource in the following format.

| [RESOURCE NAME](https://YOUR_URL.com/) | A short description of the resource |

This will create a table item and a link to your resource.

Here's an example of my changes adding "The Odin Project": An example of the repo README.md code with a red square highlighting the addition of "The Odin Project"

Saves your change.

Commit Your Changes

First, we will stage your changes:

git add .

This stages all your files (which should only be the README.md, then commit the changes (and update your message):

git commit -m "Add YOUR_RESOURCE_NAME to list"

Push your changes

Push the changes to your forked repository on GitHub:

git push origin <name-of-your-branch>

If you are using the suggested branch, it will look something like this:

git push origin docs/new-resource

Create a Pull Request

Go to your forked repository on GitHub.

You'll see a Compare & pull request button. Click on it.

Showing the forked repository after pushing to it.

Ensure the base repository and branch match with the repository and branch you want to merge your changes into.

Showing the new pull request page, highlighting the branches

Add a descriptive title and comment for your PR. There are some hints when you open the Pull request with pre-written content.

Finally, click Create pull request.

For Bonus points, check all the checkboxes and have a descriptive Pull Request: Showing the open Pull Request

Await Feedback & Celebrate! 🎉

Maintainers or collaborators of the repository will review your changes. They might suggest changes, improvements or ask for clarifications. It's crucial to collaborate and discuss in a polite and constructive manner.

Once the maintainers are satisfied with your contribution, they will merge it.

Congratulations, you've made your first open-source contribution! 🎉

Even if your contribution doesn't get merged, you have still contributed.

We will try to work with everyone to get their contribution over the line! ✅

Things to Remember

Open source is not just about code. Documentation, design, community management, and many other non-code aspects are equally valuable.

Whatever skills you have, there's likely a way you can contribute.


Did we forget anything?

Let us know in the comments. 💬

Happy coding! ❤️

OpensourceCommunity
Avatar for Codú

Written by Codú

The team account for Codú. Sharing all the latest news with Codú.

Loading

Fetching comments

Hey! 👋

Got something to say?

or to leave a comment.