Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
January 15, 2023 03:59 am GMT

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.

Table of Contents

  • Fork this repo
  • Clone this repo
  • Create a branch
  • Making a Pull Request

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
  • and cd into the directory
cd contribute-practice
  • Clone the forked repository to your local machine by typing git clone followed by the SSH link that you copied.
git clone copyoftheurlssh

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

Contribution time!

  • Open the contributing.md file, you can use a text editor of your choice, for example, nano contributing.md or vi contributing.mdI personally use vs code, so I would type:
code .
  • 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

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

git add (files changed)

now lets commit our changes with a short description

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

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

Making a Pull Request

Step 1

step 1 Pull request

  • Go to your forked repository on GitHub, click on "contibute" 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!

  • Once you have filled out the details, click the "Create pull request" button to submit your pull request for review.

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

cute studio ghilbi gif

  • Great job! You've just successfully completed the usual fork -> clone -> make changes -> pull request workflow, which is commonly used by contributors. Keep it up and keep on contributing!

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


Original Link: https://dev.to/hyuncafe/making-your-first-open-source-contribution-a-beginner-friendly-guide-4cp5

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To