DEV Community 👩‍💻👨‍💻

DEV Community 👩‍💻👨‍💻 is a community of 968,547 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Ezpie
Ezpie

Posted on

How to contribute in github?

You may have wondered if you could ever help a software or any other project created by someone else which you may be using? Will you can help by simply contributing to that project!
Here is how you can contribute to maybe my website right here after reading this article

fork it first

Forking any repository in github create's an identical repo of your own only in github.
To do this you mush click the button on the top-right of the screen sayings fork.
Now lts create a copy of the repo in your local system(your computer files basically)

clone the repo

Go to the original repo and click the green icon saying code. Copy the given https url. Now open a terminal(git bash for example Git bash is only for windows). Now type git clone https://url/goes/here.

Now we have the original repos copy and we as not part of the repos team so cannot make changes to it. Do make changes we need to clone our github repo which we forked as will.

Go to your forked repo and the same way copy the https url. Now open the terminal and don't do git clone url. But do this first git remote rename origin upstream. Now the original repo is renamed as upstream.
Now do git remote add origin https://url/here. Good now we have two remotes the origin one which is our github forked repo and the upstream which is the original one.

Write some code

Now write or do some editing on the origin remote and push the commit. Type git push origin for pushing commit to your forked repo not the original one!

do a pull request

Now go to github and open your forked repo. You will see at the top github is saying this branch is one commit ahead of original-branch-name right next is an option of pull_request, click it then a page with pull request will open, do a quick explanation of what you have done to the code and the team well soon be done with your pull request and now there software or project is now having changes made by you!

end

Great job on your first ever contribute! If you like to do some more then go ahead and do it in my website here.

Top comments (0)

🌚 Friends don't let friends browse without dark mode.

Sorry, it's true.