Hello Opensource

This is your "Hello world" for open source contributions. Want to try practicing some PRs? This the right place!

Step 1: Fork this repo

fork this repository

This creates a copy of this repo to your github account. Consider a scenerio were you want to work with some code from your friend. So you copy the code in a flash drive from your friends PC. Forking is similar to this.

Step 2: Clone the repo

Now you got the repo on your account.To work with code, clone the repo to your local machine. Similar to copying the code from the flash drive to your system. If you haven't install the git, It is a best time to do this.

Click on the "Code"

Copy the link

To clone the repo, open the terminal and run the command.

git clone "url-you-copied"

Now you have the project repo on your local machine.

Step 3: Create a new branch

Go to the repo directory on your machine

cd Hello-opensource

Create a new branch (Always create a branch if you wish to contribute)

git checkout -b <branch-name>

for example:

git checkout -b add-bruce-wayne

why create a new branch? You don't want to mess the code your friend have already written. By creating new branch, you can safely work on top of the friend's progress.

Step 4: Create a new file

Go to contributions

cd contributors

create a new file in that directory and fill in your info.

For ex:

Name: Bruce Wayne
Github: [batman](https://github.com/batman)

Save as <your-name>.md

Step 5: Commit changes

If you finalise the changes you can store the changes permanently by two steps add the changes

git add <filename>

commit the changes

git commit -m "Add <your-name> to contributors"

Step 6: Push changes

Push the changes to your repo by:

git push origin <add-your-branch-name>

from our earlier example we copied the files from the flash drive. We made some changes. Now we are copying back to flash drive, So we can give our changes to friend.

Step 7: Create a pull request

Here you give the flash drive to your friend. So he can look into the changes you have made. If everthing is good, he can have the changes you made to his project.

First go to the github repo in your account. Click Compare & pull request

And submit the pull request by clicking Create pull request

Hurray!

Congratulations, you have made it. Got any doubts, we are here to help you gitter.

Summary

 fork ----> clone ----> make changes -- +
                                        | 
create a PR <---- push <---- commit <-- +

Addditional resources

If you want to explore git more here are few resources that could help you