Git Worflow
Working with Pull Requests
Submitting Pull Requests
Please take steps to make merging easy and keep the history clean and useful.
Always work on a branch. Not touching the master branch will also simplify keeping your fork up-to-date.
Use issues properly. We have a whole set of guidelines on how to raise an issue. Bugs, changes and features are all different and should be treated differently. Use your commit message to close or reference issues. The more information you provide, the more likely your PR will get merged.
Updating a Pull Request
If your PR has fallen behind the master branch and can't be merged cleanly, just re-do the steps above (pull from master, rebase your branch), then force push to your branch using git push -f origin my-feature-branch
. This will update the PR commits. Of course, never force push to any branch you have shared with others & be very careful about what you force push.
Fixing up Code Style / Tests
If you've made a PR that needs a quick fix for code style or tests, the easiest way to do this and end up with a single commit is:
- make your changes
- use
git add
to stage your changes - run
git commit --amend
to add these changes to your existing commit - then force push to your branch using
git push -f origin my-feature-branch
What Happens Next
Your code will be initially tested via our CI, and if it passes will then be reviewed by a member of the Coinolio team.
Small changes are usually accepted and merged quickly. For more complex changes, the review process may take longer as a member of the team makes sure nothing fails through a more manual process.
If your PR has fallen behind master and can no longer be merged, we will in most cases rebase / merge master. In some cases with lots of small changes we will ask you to do this as you are more familiar with your changes than we will be.
Commit guidelines
## Standards / Format
We follow the Convential Commits guidelines, specifically the conventional-changelog format.
This requires all commits to follow this format:
<type>(scope): <description>
[optional body]
[optional footer]
You will end up with a commit looking something like:
> feat(events): an absolutely awesome description
## Commiting code
Pre-commit
If you have setup Coinolio and have ran
npm install
you should not need to setupcommitzen
manually, it will be available vianpm run cz
.If you would like to manually install
commitzen
, please follow their installation steps.
Run git add .
to stage all changed files and commit using npm run cz
(not git commit
), this will run you through a setup process to submit commit messages in the correct format. Simples!
GitHub
## Labels
Updated almost 7 years ago