Contribute to Git
Steps to contribute your changes / patches in open source repository.
Preparing your Fork
Hit ‘fork’ on Github, creating e.g.
yourname/theproject
- Clone your project:
git clone git@github.com:yourname/theproject
. - Create a branch:
cd theproject; git checkout -b foo-the-bars 3.5
.
Making your Changes
- Add changelog entry crediting yourself.
- Write tests expecting the correct/fixed functionality; make sure they fail.
- Hack, hack, hack.
- Run tests again, making sure they pass.
- Commit your changes:
git commit -m "Foo the bars"
Creating Pull Requests
- Push your commit to get it back up to your fork:
git push origin HEAD
- Visit Github, click handy “Pull request” button that it will make upon noticing your new branch.
- In the description field, write down issue number (if submitting code fixing an existing issue) or describe the issue + your fix (if submitting a wholly new bugfix).
- Hit ‘submit’! And please be patient - the maintainers will get to you when they can.