Skip to content

Instantly share code, notes, and snippets.

@carlcrott
Forked from chrislerum/gist:566697
Last active December 18, 2015 03:09
Show Gist options
  • Save carlcrott/5716574 to your computer and use it in GitHub Desktop.
Save carlcrott/5716574 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. Pull
$ git pull
... or, if this is your first time ever getting the code, do:
$ git clone git@github.com:our_repo/our_repo.git
2. Run tests. If not all tests pass stop here and investigate. Do not continue to develop until all green.
3. Switch to your personal branch
$ git checkout -b my_work
4. Do a little coding
5. Make sure the tests are passing
6. git commit
7. repeat steps 4, 5 and 6 as many times as you wish
8. git checkout master
9. git pull (you do this at this step in case someone else pushed while you were working)
10. If that git pull says 'Already up-to-date', proceed to next step, otherwise run tests again
11. git checkout my_work
12. git rebase master
13. git checkout master
14. git merge my_work
15. git push
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