GithubHelp home page GithubHelp logo

00mjk / contributing-to-open-source Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tg922/contributing-to-open-source

0.0 0.0 0.0 469 KB

The aim of this project is to simplify and guide the way beginners make their first contribution. If you are looking to make your first contribution, follow the steps below.

contributing-to-open-source's Introduction

Contributing-to-open-source

  • The aim of this project is to guide beginners to make their first contribution. If you are looking to make your first contribution, follow the steps below.

visitor badge

⭐ Before starting please kindly read the Code of Conduct of the repo where you are contributing ⭐

👉 Table of Contents 👈

  • How to Contribute?

  • How to make a Pull Request?

    Task 1: Forking the repo
    Task 2: Clone the forked repo
    Task 3: Creating a new branch
    Task 4: Make Changes in Code
    Task 5: Commit and Push
    Task 6: Create Compare and Pull Request
    Task 7: Create a PR

🤔💻 How to Contribute?

  • Take a look at the existing Issues
  • Create a Pull Request, which will be promptly reviewed and given suggestions for improvements by the community.
  • Add screenshot in your Pull Request to help Project Admin understand the effects of the changes that are included in your commits.

🤷‍♂️ How to make a Pull Request?

Task 1: Forking the repo

  • To work on a project, we will need to make exact copy of your repo. For doing this, we first fork the repo and then clone it so that we have a local working copy. get your own copy of repo by clicking Fork button right upper corner !!

Image19

Task 2: Clone the forked repo

  • After the repo is forked, we can now clone it so that we can have a local copy of the codebase. To make our local copy of the do follow these steps,

Note: Origin = Repo link of our forked project where we are contributing

Image18

  • Open the Command Prompt
  • Type this command:
$ git clone https://github.com/<your-github-username>/Repo Name

Task 3: Creating a new branch

  • This is VIMP step that must be followed to contribute to Open Source organization. A branch helps to manage the workflow, by isolating our code and does not create a mess. To create a new branch,
$ git branch <name_of_branch>
$ git checkout -b <name_of_branch>
  • After this we keep our cloned repo up-to-date by pulling from the upstream (this will also avoid any merge conflicts while committing new changes)

Note: Upstream = Repo link of project where we are contributing

git pull origin main

Task 4: Make Changes in Code

  • We will make our changes according to the issue that we are assigned for !!

Task 5: Commit and Push

  • Once we have modified an existing file or added a new file to the project, you can add it to your local repo, which we can do with the git add command.
git add .
  • With our file staged, we’ll want to record the changes that we made to the repo with the git commit command.
  • The commit message is an important aspect of your code contribution; it helps the other contributors fully understand the change you have made, why you made it, and how significant it is.
git commit -m "Fixed Issue Number message"

At this point we can use the git push command to push the changes to the current branch of our forked repo i.e origin,

git push origin <branch-name>

Task 6: Create Compare and Pull Request

Now, we are ready to make a PR to the original repo i.e, Upstream. Now, we should navigate to our origin repo, and press the Compare & pull request button on the page. We should add in a title, a comment, and then press the Create pull request button.

Task 7: Create a PR

Detailed Document for Pull Request!

Congratulations! 🎉 🎉 You've made your first contribution!

                         

For those who see the below message in their forked repo

Image16

  • First Fetch and merge
  • Go to terminal and pull the upstream default branch

Note: Sometimes the default branch name may not be master/main, So we need to check default branch name before pulling the upstream branch

  • Repeat Task 4 to 8 for contributing

Congratulations! 🎉 🎉 You've made your first contribution!


contributing-to-open-source's People

Contributors

tg922 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.