Last active
December 17, 2024 21:27
-
-
Save twoism-dev/9929426 to your computer and use it in GitHub Desktop.
Revisions
-
twoism-dev revised this gist
Apr 2, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,7 +17,7 @@ We have two branches **develop** and **master**. * Use **--no-ff** when merging your feature branch into develop or master, this forces creation of a merge commit, making it easier to see what was merged and when. ## Working on a new feature ## * Create a new branch **from master** called 'feature/[trello-card-id]' ``` $ git checkout -b feature/160-add-picture-of-cat master ``` -
twoism-dev renamed this gist
Apr 2, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
twoism-dev created this gist
Apr 2, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,53 @@ # Our Git Flow We are using a simple git flow based on git flow and github flow. We have two branches **develop** and **master**. **develop** is a representation of staging **master** is a representation of production ## The Rules ## * Master is **always** deployable. * All tests must pass on Master at all times. * **Do not** commit directly to develop or master, only merge in feature/fix branches. * As soon as a feature/fix is merged into develop it should be deployed to staging. * As soon as a feature/fix is merged into master it should be deployed to production. * Feature branches should be pushed to origin, for code review and so others can see what is being worked on. * Use **--no-ff** when merging your feature branch into develop or master, this forces creation of a merge commit, making it easier to see what was merged and when. ## Working on a new feature ## * Create a new branch **from master** called 'feature/<trello-card-number>-<descriptive-name>' ``` $ git checkout -b feature/160-add-picture-of-cat master ``` * Work on feature * Push feature to origin regularly ``` $ git push -u origin feature/160-add-picture-of-cat ``` * Submit for code review (if required) (e.g. move trello card to code review) * Merge feature into develop ``` $ git checkout develop Switched to branch 'develop' $ git merge --no-ff feature/160-add-picture-of-cat $ git push origin ``` * Deploy to staging ``` $ git push staging develop:master ``` * Submit for QA (e.g. move trello card to QA) * Merge feature into master ``` $ git checkout master Switched to branch 'master' $ git merge --no-ff feature/160-add-picture-of-cat $ git push origin ``` * Deploy master to production ``` $ git push production master ``` * Delete feature branch