Skip to content

Instantly share code, notes, and snippets.

@MarcDiethelm
Last active April 1, 2024 13:55
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 https://github.com/MarcDiethelm/contributing/blob/master/README.md. I turned it into a Github repo so you can, you know, contribute to it by making pull requests.


Contributing

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.

@dwsmith1983
Copy link

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

@rickycool
Copy link

What can I remove from the rapidscan.py 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.

@ambroisehdn
Copy link

Thank you !

@Akshit6828
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
  • BUT THIS DOESNT ADDS TO MY OPEN SOURCE CONTRIBUTIONS OR MY GITHUB STATS IN (Contributed -To)

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

@mathiasgodwin
Copy link

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

@agschnitzer
Copy link

Thanks, helped me a lot!

@lisatriana
Copy link

Thanks a lot, that was so help helpful

@fabrice8
Copy link

Great. Thanks

@JustAProgrammer01234
Copy link

This is a very useful guide. Thanks a lot!

@anushkadar
Copy link

Good stuff. Thanks

@scriptnoneskill
Copy link

./rapidscan.py", 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)?

#fix

@8xu
Copy link

8xu commented Oct 18, 2021

This is helpful! <3

@talib1996
Copy link

Thanks a lot. Very Helpful

@dozykeys
Copy link

Very insightful

@f4b3r
Copy link

f4b3r commented Nov 10, 2021

thank you. so helpful!

@smaster0517
Copy link

Good!
Wonderful!
Hope to see the further articles.

@alphainfinitus
Copy link

Thank you kind sir!

@shemake
Copy link

shemake commented Dec 30, 2021

This was extremely helpful. Thank you for the writeup!

@dagnu11
Copy link

dagnu11 commented Jan 5, 2022

Very Helpful

@lexNwimue
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?

@lexNwimue
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

@silas315
Copy link

thanks for this

@JonEckenrode
Copy link

Good instructions. Thanks.

@TOGUNOLUWATOBI
Copy link

Very Helpful. Thanks

@idontcalculate
Copy link

Thanks!

@LEG1ON-Group
Copy link

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

@kururu-abdo
Copy link

would be great if you add an example for every step

@kururu-abdo
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

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