Maintainer - @MadhavBahlMD
First time open source seems very confusing. So, here's a practise environment for your first contribution :D
NOTE - CONTRIIBUTION TO THIS REPO IS NOT COUNTED AS A HACKTOBERFEST CONTRIBUTION. THIS IS JUST FOR PRACTICE.
Also, you can see the presentation slides of Kickoff To Opensource
here: madhavbahl.tech/hacktoberfest2021/
First step for starting open source is obviously, finding an open source project to contribute to!
Either you can go for contributing the project on some open source organisation like fossasia etc.
Or, you can find your projects/issues you want ot work on from these websites.
-
issuehub.io - A website which helps you find projects/issues based on your required language or issue labels.
-
Code Triage - Another useful tool for searching issues
-
Up For Grabs - List of projects with issues that can be resolved by beginners
-
First Timers Only - A list of issues that are labelled "first-timers-only".
-
Awesome First Timers PR - A list of awesome beginners-friendly projects.
By now, you must have found your required project/issue.
This is a first timers only repo which can be used to make your first open source contribution. We will write our username and description in the CONTRIBUTORS.md file and make a PR.
Congratulations! you just finished STEP 1
Fork this repo by clicking on the fork button on the top of the page. This will create a copy of this repository in your account.
Clone this repo to your machine. Go to your GitHub account, click on the clone button and then click the copy to clipboard icon.
Open a terminal and run the following git command:
git clone "Copied URL"
Go to the directory where you cloned the repo.
Create a new branch using git checkout
command
git checkout -b <branch-name>
for keeping a standard, let's have the name of branch as username
for example:
git checkout -b MadhavBahlMD
Make the necessary changes, commit and push your code to GitHub.
Here, we are adding our username, name and bio in the CONTRIBUTORS.md
To make commit and push changes,
git add .
git commit -m "Add [username] as a contributor"
git push origin <branch name>
If you go to your repository on GitHub, you'll see a Compare & pull request
button. Click on that button.
Now submit the pull request!
Soon your changes will be reviewed and the PR will be merged if the changes are legit!
You just made your first PR.
Welcome to the world of open source
First of all, switch to the master branch, master branch is the main working branch which is supposed to have most updated code!
git checkout master
Now, add original repo's url as a new remote, say original
git remote add original git@github.com:Logic-Xcution/Kickoff-To-Open-Source.git
This is a way of telling git that another version of this project exists in the specified url and we’re calling it original
. Once the changes are merged, fetch the new version of original repository.
git fetch original
Now, you need to merge the new revision of my repository into your master branch.
git rebase original/master
Now you can push these changes to your GitHub repo:
git push origin master
Also, since your changes are merged and your repo is updated, the branch you created for your contribution is no longer required and you can delete it!
git branch -d <brach-name>
git push origin --delete <branch-name>
Now you know how to contribute to open source, go ahead champ!