Inspired by this article
- create your feature branch
# grab the latest from upstream/master
git pull --rebase upstream master
# create your feature branch
git checkout -b 123-wine-validations
- commit your changes
# stage and commit your changes to feature branch
git add -p
git commit -m "refs #123 - adding validations to wine model"
- deploy changes to dev for internal review
# rebase from upstream/master and resolve any conflicts
git pull --rebase upstream master
# switch to the dev branch
git checkout dev
# rebase from upstream/dev
# (which could contain merged branches from other team members)
git pull --rebase upstream dev
# merge your branch
git merge 123-wine-validations
# push changes to upstream/dev (which triggers a deploy)
git push upstream dev
- deploy changes to stage for test.v2 review
# checkout your feature branch and rebase from master
git checkout 123-wine-validations
git pull --rebase upstream master
# follow the previous step only using the test branch
git checkout test
git pull --rebase upstream test
git merge 123-wine-validations
git push upstream test
- deploy changes to production
# checkout your feature branch and rebase from master
git checkout 123-wine-validations
git pull --rebase upstream master
# push your branch to origin
git push origin 123-wine-validations
# open a Pull Request to merge feature branch into master
- create your feature branch
# grab the latest from origin/master
git pull --rebase origin master
# create your feature branch
git checkout -b 123-wine-validations
- commit your changes
# stage and commit your changes to feature branch
git add -A
git commit -m "refs #123 - adding validations to wine model"
- deploy changes to dev for internal review
# rebase from origin/master and resolve any conflicts
git pull --rebase origin master
# switch to the dev branch
git checkout dev
# rebase from origin/dev
# (which could contain merged branches from other team members)
git pull --rebase origin dev
# merge your branch
git merge 123-wine-validations
# push changes to origin/dev (which triggers a deploy)
git push origin dev
- deploy changes to stage for test.v2 review
# checkout your feature branch and rebase from master
git checkout 123-wine-validations
git pull --rebase origin master
# follow the previous step only using the test branch
git checkout test
git pull --rebase origin test
git merge 123-wine-validations
git push origin test
- deploy changes to production
# checkout your feature branch and rebase from master
git checkout 123-wine-validations
git pull --rebase origin master
# push your branch to origin
git push origin 123-wine-validations
# open a Pull Request to merge feature branch into master