Here are the steps to commit a change to an open source project on github.
1. Fork it
Fork the repo by clicking the fork button on the github website
2. Clone it
Clone the repository to your machine
git clone https://github.com/yourusername/project |
3. Add the upstream remote
Add the original git repository as an upstream remote.
git remote add upstream https://github.com/originaluser/project |
Now if you want to get the latest changes from the original repository, you can use:
git pull upstream master |
4. Create a new branch
Create a feature branch to do your changes
git checkout -b newbranch |
5. Code away
Modify the code and commit to the feature branch. Try to keep your commits clear and concise.
6. Push to your github
Push your modifications to your remote
git push origin newbranch |
7. Issue a Pull Request
Back on github, click the Pull Request button
Select the commits you want to include, write a message and submit.
That’s it !