Skip to content

Instantly share code, notes, and snippets.

Last active July 6, 2024 13:12
Show Gist options
  • Save MarcDiethelm/7303312 to your computer and use it in GitHub Desktop.
Save MarcDiethelm/7303312 to your computer and use it in GitHub Desktop.
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

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

Copy link

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

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

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

Copy link

Thanks, helped me a lot!

Copy link

Thanks a lot, that was so help helpful

Copy link

Great. Thanks

Copy link

This is a very useful guide. Thanks a lot!

Copy link

Good stuff. Thanks

Copy link

./", 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

Thanks a lot. Very Helpful

Copy link

Very insightful

Copy link

f4b3r commented Nov 10, 2021

thank you. so helpful!

Copy link

Hope to see the further articles.

Copy link

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

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

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

thanks for this

Copy link

Good instructions. Thanks.

Copy link

Very Helpful. Thanks

Copy link


Copy link

I connected, but I don't know how to control it. When I write "open (numbers)" up, it says "Invalid Selection."

Copy link

would be great if you add an example for every step

Copy link

  1. fork the repo you want to contribute to

  2. clone the forked repo
    git clone github/your-user/liked-to-forked-repo

  3. open terminal into repo directory in your local machine
    cd repoName

  4. check you remote origin
    git remote -v

  5. add your forked repo as origin and add the original repository link as upstream

git remote add origin url-to-forked-repo

git remote add upstream url-to-original-repo.

and check the two remotes again with git remote -v

  1. Create a new branch
    git checkout -b BRANCH_NAME

  2. commit and push to your branch
    git push origin BRANCH_NAME

  3. go to forked repo to and you will see pull requests button click on it to begin pull to the original repo

  4. Create the pull request
    lastly , go to the original repo and complete pull request

Copy link

Thanks you so much..

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