All contributions to code for The Cacophony Project should be committed using the Fork and Pull mechanism in GitHub.
The basic work flow is:
- Fork a GitHub repository.
- Clone the forked repository to your local system. (You can easily do this through the GitHub interface)
- Add a the original Cacophony repository as a Git remote. (See below for how to do this)
- Create a feature branch in which to place your changes.
- Make your changes to the new branch.
- Commit the changes to the branch.
- Push the branch to GitHub.
- Open a pull request from the new branch to the original repo.
- On the pull page check that All checks have passed. (This is when we get run our style checker and tests)
- Wait for a project maintainer to approve your code.
- Clean up your code after your pull request is merged.
Extensive details on how to do this can be found in Scott Lowe's article Using the Fork and Branch GitHub workflow.
How to add the original (upstream) repository to your repository
Add our Cacophony repository remote to your repository by calling:
> git remote add upstream https://github.com/TheCacophonyProject/<project>.git
This allows you to get the latest code and use it to update your fork at anytime by calling:
> git pull upstream master
> git push origin master