Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to contribute to a project on Github

This text now lives at I turned it into a Github repo so you can, you know, contribute to it by making pull requests.


If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request.

How to make a clean pull request

Look for a project's contribution instructions. If there are any, follow them.

  • Create a personal fork of the project on Github.
  • Clone the fork on your local machine. Your remote repo on Github is called origin.
  • Add the original repository as a remote called upstream.
  • If you created your fork a while ago be sure to pull upstream changes into your local repository.
  • Create a new branch to work on! Branch from develop if it exists, else from master.
  • Implement/fix your feature, comment your code.
  • Follow the code style of the project, including indentation.
  • If the project has tests run them!
  • Write or adapt tests as needed.
  • Add or change the documentation as needed.
  • Squash your commits into a single commit with git's interactive rebase. Create a new branch if necessary.
  • Push your branch to your fork on Github, the remote origin.
  • From your fork open a pull request in the correct branch. Target the project's develop branch if there is one, else go for master!
  • ...
  • Once the pull request is approved and merged you can pull the changes from upstream to your local repo and delete your extra branch(es).

And last but not least: Always write your commit messages in the present tense. Your commit message should describe what the commit, when applied, does to the code – not what you did to the code.

Copy link

mauriciogracia commented Dec 12, 2020

Why we need to fork the repo ? Why not just clone the repo, work on a new branch and after commit&push creating pull request ? Please help me to understand it

In order to PUSH to a repository you need write permission, that you would have to request before you can do it, in this way you can just do Pull Requests from you own fork and they can decide without having to worry about permission issues (and revoking them when no longer needed, etc)

Copy link

muratgurses commented Dec 29, 2020

Thank you for sharing.

Copy link

dwsmith1983 commented Feb 1, 2021

Interactive rebase link is dead

Copy link

clowa commented Feb 14, 2021

Hey @dwsmith1983, I'm not sure how the previous site looks like but this maybe help you.

In the github repo is an open pull request to fix this issue updating the link to this site.

Copy link

dwsmith1983 commented Feb 15, 2021

@clowa thanks. I found something a week or so back. Just letting the author know so they can update it.

Copy link

rickycool commented Apr 20, 2021

What can I remove from the file so that it will show that all tools has been loaded ?

  • some of the tools include nmap, dnsrecon, wafw00f, uniscan, sslyze, fierce, lbd, theharvester, dnswalk, golismero etc executes under one entity.

I have all listed tools loaded Rapidscan not seeing them.

Thanks in advance for your help.

Copy link

ambroisehdn commented Apr 23, 2021

Thank you !

Copy link

Akshit6828 commented Apr 28, 2021

Hi! I want to add some new files to my friend's repo. When I try to submit PR, it shows me nothing to compare. I have also checked the branch that is being compared is correct. If she adds me as a collaborator in Repo, then it doesn't count as My contribution.

Also, I followed these steps:

  • Forked my friend Repo.
  • Cloned into my PC.
  • Made new branch and added the new files
  • pushing code to my GitHub which was forked by my friend.
  • Trying to SUBMIT a PR that shows nothing to compare as I have just added some files to the project. [**** PROBLEM OCCURED HERE***]

What should I do now? in order to add code to her repo.

One possible solution is:

  • she adds me to the contributor's list.
  • I am able to push code to her repo directly

Thus help me, please!
It's feeling like I am contributing open source but I am not being shown as contributing to someone.

Copy link

mathiasgodwin commented May 26, 2021

That was yet another great expository writing. Thanks for the enlightenment.

Copy link

agschnitzer commented Jun 2, 2021

Thanks, helped me a lot!

Copy link

lisatriana commented Jun 25, 2021

Thanks a lot, that was so help helpful

Copy link

fabrice8 commented Aug 31, 2021

Great. Thanks

Copy link

JustAProgrammer01234 commented Sep 2, 2021

This is a very useful guide. Thanks a lot!

Copy link

anushkadar commented Sep 11, 2021

Good stuff. Thanks

Copy link

scriptnoneskill commented Sep 28, 2021

./", line 107
print bcolors.BOLD+"Vulnerability Threat Level"+bcolors.ENDC
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(bcolors.BOLD+"Vulnerability Threat Level"+bcolors.ENDC)?


Copy link

8xu commented Oct 18, 2021

This is helpful! <3

Copy link

talib1996 commented Oct 19, 2021

Thanks a lot. Very Helpful

Copy link

dozykeys commented Oct 26, 2021

Very insightful

Copy link

f4b3r commented Nov 10, 2021

thank you. so helpful!

Copy link

smaster0517 commented Dec 27, 2021

Hope to see the further articles.

Copy link

alphainfinitus commented Dec 27, 2021

Thank you kind sir!

Copy link

shemake commented Dec 30, 2021

This was extremely helpful. Thank you for the writeup!

Copy link

dagnu11 commented Jan 5, 2022

Very Helpful

Copy link

lexNwimue commented Apr 24, 2022

Extremely helpful but could have used some actual examples. Some new users may not even know how to set upstream

Copy link

ghost commented May 31, 2022

I don't want to use since I do not want to use git techniques or github. Is there any way I could contribute without commands?

Copy link

Yannickzo commented May 31, 2022

thanks you

Copy link

lexNwimue commented May 31, 2022

I don't want to use since I do not want to use git techniques or github. Is there any way I could contribute without commands?

I don't think that's advisable but I guess there must be GUI git tools

Copy link

silas315 commented Jun 23, 2022

thanks for this

Copy link

JonEckenrode commented Aug 30, 2022

Good instructions. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment