- Also, you want to download and install Git Flow by whatever method is best for your platform:
- Mac:
$ brew install git-flow
- Others: figure it out yourself
- Mac:
$ git start my-feature-branch
- The
start
command ensures your branch name is valid and your codebase is uptodate. - Use a descriptive branch name to help other developers (ex: fix-login-screen, api-refactor, payment-reconcile, etc)
Use Test Driven Development to ensure that the feature has proper code coverage.
- RED - Write tests for the desired behavior...
- GREEN - Write just enough code to get the tests to pass...
- REFACTOR - Cleanup for clarity and DRY-ness...
- Follow best practices for git commit messages to communicate your changes.
- Add ticket references to commits to automatically trigger product management workflows
- Only write the minimal amount of code necessary to accomplish the given task.
- Ensure branch stays up-to-date with latest changes that are merged into master by using:
$ git update
- Changes that are not directly related to the current feature should be cherry-picked into their own branch and merged separately.
- Every line of code should have associated unit tests. If it's not tested, it's probably broken and you just don't know it yet...
- Use BetterSpecs.org as reference for writing readable and maintainable unit tests.
$ git review
- Describe high level overview of the branch in pull request description. Include links to relevant resources.
- Record artifacts created by this feature (ex: screenshots of UI changes, screencasts of UX changes, logs from database migrations, etc)
- Document follow-up items/tasks that need to be addressed post-release
- Is there a simpler way to accomplish the task at hand?
- Are we solving the problems of today and not over engineering for the problems of tomorrow?
With great power comes great responsibility…
- You are responsible to test your changes locally and in production environments as necessary
- Test changes in local development environment using the same process used by Continuous Integration with:
$ grunt test
$ git release
- Ensure that build is green before releasing branch
- Pull requests must be signed off by team leads before release (preferrably via emoji)