DEV Community

Cover image for Making Your First Open Source Contribution: A Beginner-Friendly Guide
HyunSun
HyunSun

Posted on • Edited on

Making Your First Open Source Contribution: A Beginner-Friendly Guide

First time Practice Contributions!

hot coffee

Visit This Link to get Started for this Contribution!

Introduction

Welcome to a beginner-friendly GitHub repository. A great place to start for a first practice contribution!

This repo is designed for first-time contributors to get familiar with the process of forking a repo, cloning it to their local machine, making changes, and submitting a pull request.

I've included some simple tasks for you to complete, along with step-by-step instructions on how to submit your changes.

Whether you're new to programming or just new to open source contributions, this is the perfect place to get started. So, fork the repo, clone it, and let's get started!

Objectives

  • Provide an introduction and overview of the repository for first-time contributors.
  • Explain the process of forking a repo, cloning it to a local machine, making changes and submitting a pull request.
  • Include simple tasks for contributors to complete with step-by-step instructions on how to submit changes.
  • Encourage contributors to fork and clone the repo and get started with making contributions.

cute lazy cat gif chasing butterfly

Fork this repo

Step 1

step 1 fork this repo drown down button

  • Click on the "Fork" drop down button located in the top right corner of the page.

  • Click on the "+ Create a new fork*

Step 2

step 2 fork this repository addition

  • Click on "Create fork"

  • Once the repository has been forked, you will be taken to the forked repository's page.

  • This will be a copy of the original repository, but it will be under your account.

Clone this repo

step 1 click code then ssh then copy

  • First, lets click on the "Code" drop down button, click on "SSH" then click the "Copy Icon"

  • Then, let's go to our local machine, open the terminal, and create a new directory to put our newly cloned repo in and name it "contribute-practice"

mkdir contribute-practice
Enter fullscreen mode Exit fullscreen mode
  • and cd into the directory
cd contribute-practice
Enter fullscreen mode Exit fullscreen mode
  • Clone the forked repository to your local machine by typing git clone followed by the SSH link that you copied.
git clone copyoftheurlssh
Enter fullscreen mode Exit fullscreen mode

Create a branch

  • Now let's create a new branch through the terminal using the git switch BranchName.

Replace BranchName with the name of the new branch you want to create.

For example:

git switch -c HyunCafe
Enter fullscreen mode Exit fullscreen mode

Contribution time!

  • Open the contributing.md file, you can use a text editor of your choice, for example, nano contributing.md or vi contributing.md I personally use vs code, so I would type:
code .
Enter fullscreen mode Exit fullscreen mode
  • Follow the directions under the contributing.md and now lets commit your changes!

  • Remember the order for git best practices!

    git status >> git add (files changed) >> git commit -m "insert short description of changes made" >> git push

type:

git status
Enter fullscreen mode Exit fullscreen mode

now you can see the files that were changed, now add them

git add (files changed)
Enter fullscreen mode Exit fullscreen mode

now lets commit our changes with a short description

git commit -m "Add: Added my name to list, My first contribution!"
Enter fullscreen mode Exit fullscreen mode

Push the changes to your forked repository on GitHub using the command git push origin BranchName, where BranchName is the name of the branch you are working on.

git push -u origin BranchName
Enter fullscreen mode Exit fullscreen mode

Making a Pull Request

Step 1

step 1 Pull request

  • Go to your forked repository on GitHub, click on "contribute" drop down, and click on "Open pull request"

Step 2


step 2 Pull request
  • Fill in the title and description of the pull request to explain the changes you made!

  • After filling out the details, click the "Create pull request" button to submit your request for review.

Great job! All done! Wasn't so bad was it?

cute studio ghilbi gif

  • Congratulations on completing the typical fork, clone, make changes, and pull request workflow commonly used by contributors. Keep up the good work and continue contributing!

  • I will get around to merging the request when I can, I am usually good about it!

Top comments (2)

Collapse
 
ashutoshvaidya profile image
Ashutosh Vaidya

Nice introduction, done my first contribution. :)
Thank you.

Collapse
 
bcostaaa01 profile image
Bruno

The choices for the gifs were super cool! :) good article!