Make your first pull request

guide
first-pull-request

(Aditya Chatterjee) #1

This is an easy to follow guide to make your first open-source pull request :tada:
We will consider Cosmos project which is one of the most contributor :family_man_woman_girl_boy: friendly projects.

First of all, sign into your GitHub account.

Step 1 : Fork the target project :desert_island:

c1

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 :joystick:

c2

Click on the above button to copy the project URL to your clipboard. It will be of the format: https://github.com/<username>/<projectname>.git

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

Replace AdiChat with your own username.

Step 3 : Create a new branch :tanabata_tree:

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:

cd cosmos

Now create a branch using the git checkout command:

git checkout -b <your-new-branch-name>

For example:

git checkout -b topological-sort

Step 4: Make changes, commit and push it :hammer_and_wrench:

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 add
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 :partying_face: A new pull request is made:

Step 6: Get your contribution reviewed and merged :tada:

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 :tropical_drink: , you just made an epic impact in the World :earth_asia:


How to use OpenGenus Task Lists?
(Team) #3