A checklist for test-driven development

November 26, 2016

  1. Create a new branch for the new feature

    $ git checkout -b myfeature
    $ git push origin myfeature
  2. Create a new branch for test development

    $ git checkout -b myfeature/test
  3. Write (failing) test code that encapsulates the intent of the new feature

  4. Push the test code to the myfeature/test branch

    $ git add ...
    $ git commit ...
    $ git push origin myfeature/test
  5. Open a pull request from myfeature/test to myfeature

  6. Create a new branch for feature development

    $ git checkout -b myfeature/impl
  7. Code up the feature to make the test pass

  8. Push the feature code to the myfeature/impl branch

    $ git add ...
    $ git commit ...
    $ git push origin myfeature/impl
  9. Open a pull request from myfeature/impl to myfeature

  10. Finally, open a pull request from myfeature to master