This is an easy to follow guide to make your first open-source pull request
We will consider Cosmos project which is one of the most contributor friendly projects.
First of all, sign into your GitHub account.
Step 1 : Fork the target project
This step will create your personalized copy of the project you are looking to contribute to. Click on the “fork” button to fork the project to your profile.
Step 2 : Clone your local project
Click on the above button to copy the project URL to your clipboard. It will be of the format:
Switch to your terminal/ command line (
Ctrl + Alt + T in Ubuntu,
Press CMD + Space, type terminal and hit return in Mac OS X and
Press WinR key, type CMD and press enter in Windows)
Clone your repository by typing the following command:
git clone https://github.com/AdiChat/cosmos.git
AdiChat with your own username.
Step 3 : Create a new branch
This is an optional step but considered a good practice. You may think of a branch as a new separate copy of the changes to the original workspace. Follow the following commands in the terminal:
Change to the repository directory on your computer:
Now create a branch using the
git checkout command:
git checkout -b <your-new-branch-name>
git checkout -b topological-sort
Step 4: Make changes, commit and push it
Make all changes you want to make in your local copy. In this example, we added a python code for topological sort.
Once done switch to terminal and follow the following commands:
git commit -m "<your commit message>"
git push origin <branch-name>
If you used the branch name as
topological-sort, the last command is
git push origin topological-sort or else, if you skipped branches, then the command will be
git push origin master.
Step 5: Open a pull request
Open a pull request and submit it:
Hurray A new pull request is made:
Step 6: Get your contribution reviewed and merged
Ask community maintainers and other contributors to review your new shiny pull request and get it merged.
For OpenGenus, you may inform our maintainers anytime and also, create a new topic at our discussion forum.
Enjoy your time , you just made an epic impact in the World