Developing Features / Committing Work
These processes should make it as easy as possible:
- for multiple developers to collaborate on a project
- to deploy reliably and frequently
- to review each other's code
- to document our intention with commit messages
- We work on topic branches so that we may create pull requests for every change.
- Never commit directly to
main* - Pull
main* before creating a branch - Rebase topic branches off of
main* whenmain* changes
* Newer projects default to usingmainas the default branch to match updated tooling. When a project has a beta environment, we've also had a branch off ofmainnamedbeta. In this case, hotfixes are always based offmainand new features are based off ofbeta. - Never commit directly to
- We make our commits discrete, atomic, and succinct in order to better communicate their intention.
- Break separate logical changes into separate commits
- Don't commit partial work; no commit should knowingly leave the project in a broken state
- Minimize commit noise (changes that aren't relevant to the commit)
For a variety of reasons, we may not make discrete, atomic, and succinct commits while working on a branch — we may commit partial work, have a false start, or notice an oversight in a previous commit. We may then use tools like
git commit --amend,git rebaseandgit cherry-pickto rewrite our branch's commits before requesting a review. Our goal is to make code review easier and git history more useful. - When pairing, we make commits jointly using
ep pair - We label commits to help Houston create release notes and resolve alerts automatically.
- Use
[feature],[improvement]and[fix]on changes that should be mentioned in release notes - Use
[skip]or[refactor]on changes that should not be mentioned in release notes - Other labels like
[squash]and[wip]may be useful for work-in-progress but should never be merged tomain. (see Rewriting Commits above)
- Use
- We create a Pull Request as soon as we are ready to deploy our work to Staging for Testing, to request a review, or to share our work-in-progress with other developers.