markoff
markoff copied to clipboard
Comments inside of code blocks don't format correctly after first code block.
git Cheat Sheet
The Rules
To maintain the integrity of the branches and ensure we can deploy features independently we follow these rules:
- NEVER commit directly to an ENV branch (master, stage or develop)
- NEVER merge one ENV branch into another
- Feature branches should be autonomously deployable
Step 1
Create your feature branch
# switch to the master branch
git checkout master
# grab the latest from origin/master
git merge origin master
# create your feature branch (example name 34320-AutoShipImportError)
git checkout -b 34320-AutoShipImportError
Step 2
Commit your changes
# stage and commit your changes to feature branch
git add -A
git commit -m "34320-AutoShipImportError - adding validations to form"
Step 3
Deploy changes to dev for internal review
# merge from origin/master and resolve any conflicts
git merge origin master
# create dev feature branch
git checkout -b 34320-AutoShipImportError-develop 34320-AutoShipImportError
# merge from develop (and resolve conflicts)
git merge origin develop # push develop branch
git push origin 34320-AutoShipImportError-develop
Go to TFS and open a Pull Request with squashing to merge feature branch into develop.
Step 4
Deploy changes to production
# checkout your feature branch and merge from master
git checkout 34320-AutoShipImportError git merge origin master
# push your branch to origin
git push origin 34320-AutoShipImportError
Open a Pull Request to merge feature branch into master
