Note : The first two steps are to be done in the start only
for the rest of the times , you just need to make a pull request
to be up to date to the same changes as per the original repository.
In order to work on an open-source project, you will first need to make your own copy of the repository. To do this, you should fork the repository and then clone it so that you have a local working copy.
Fork this repo. Click on the Fork button at the top right corner.
With the repository forked, the next step is to clone it so as to make a copy of the code base locally on your device.
Cloning the Repository
To make your own local copy of the repository you would like to contribute to, let’s first open up a terminal window.
We’ll use the git clone command along with the URL that points to your fork of the repository.
- Open the Command Prompt
- Type this command:
git clone https://github.com/your_username/IPL-fanstation
It is important to branch the repository so that you are able to manage the workflow, isolate your code, and control what features make it back to the main branch of the project repository.
When creating a branch, it is very important that you create your new branch off of the master branch. To create a new branch, from your terminal window, follow:
git branch your-branch
git checkout your-branch
Once you enter the git checkout command, you will receive the following output:
Switched to branch 'your-branch'
Add/Work on the files as per your assignments.
Once you have modified an existing file or added a new file to the project, you can add it to your local repository, which we can do with the git add command , commit these added changes and then push these to github. The set of commands for this step are as follows:
git add .
git commit -m "commit message"
git push --set-upstream origin new-branch
At this point, you are ready to make a pull request to the original repository.
You should navigate to your forked repository, and press the “Compare & pull request” button on the page.
GitHub will alert you that you are able to merge the two branches because there is no competing code. You should add in a title, a comment, and then press the “Create pull request” button.
You have sucessfully submitted your Assignment. Kudos!!
Need help? Feel free to contact me @ [email protected]
S.No. | Name | GitHub Username |
---|---|---|
1. | Prateeek Maheshwari | @friskycodeur |
2. | Shivam | @the-Nightwing |
3. | Gaurav | @Gauravdarkslayer |