Skip to content

Instantly share code, notes, and snippets.

@chrislerum
Created September 6, 2010 05:57
Show Gist options
  • Save chrislerum/566697 to your computer and use it in GitHub Desktop.
Save chrislerum/566697 to your computer and use it in GitHub Desktop.
Code changes should only be pushed to github if all tests are green.
Below is a common work-flow for a team working with a central repo. several variations are possible, but if unsure, please go by this:
1. if you are working from a Pivotal Tracker story, click "start" on that story
2. git pull (or, if this is your first time ever getting the code, do git clone git@github.com:our_repo/our_repo.git to get a local copy of the repo)
3. rake db:migrate
4. rake db:test:prepare
5. spec spec
6. cucumber
7. if either are not green, stop here and investigate. do not continue to develop until all green.
8. git checkout -b my_work (create and switch to a local branch where you'll do your work)
9. do a little coding
10. make sure the tests are passing
11. git commit
12. repeat steps 7, 8 and 9 as many times as you wish
13. git checkout master
14. git pull (you do this at this step in case someone else pushed while you were working)
15. if that git pull says 'Already up-to-date', proceed to next step, otherwise run tests again
16. git checkout my_work
17. git rebase master
18. git checkout master
19. git merge my_work
20. git push
21. if you're working from Pivotal Tracker, click "finish" and then "deliver" on the story you just completed
Note on deployments: we use the master branch for deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment