Github Flow
A bit of history ...
![](https://www.demilked.com/magazine/wp-content/uploads/2016/07/unseen-rare-historical-photos-4.jpg)
A short explanation about Github Flow
To recap
- Everything in master is deployable
- No dev branch
-
before merging to master
- Squash your commits
- ​Get your code reviewed
- Deploy to demo or staging and notify QA
The golden rule:
![](https://s3.amazonaws.com/media-p.slid.es/uploads/709366/images/7494628/Screen_Shot_2020-06-23_at_18.42.26.png)
Squash your commits before pushing
7hgf8978g9... Added new slideshow feature, JIRA # 848394839
85493g2458... Fixed slideshow display issue in ie
gh354354gh... wip, done for the week
789fdfffdf... minor alignment issue
787g8fgf78... hotfix for #5849564648
9080gf6567... implemented feature # 65896859
gh34839843... minor fix (typo) for 3rd test
- VS -
7hgf8978g9... 8483948393 Added new slideshow feature
787g8fgf78... 5849564648 Hotfix for android display issue
9080gf6567... 6589685988 Implemented pop-up to select language
"commit early and commit often" but
Smart commits
git commit -m "added image upload functionality RD-143"
In short: add your JIRA ticket number to your commit messages
You can do it for your squashed commits only
Smart commits - advanced
Adding comments to your JIRA ticket:
git commit -m "added image upload functionality RD-143 #comment This will appear in JIRA"
Tracking work time on your ticket:
git commit -m "added image upload functionality RD-143 #time 3h"
Branches naming convention ?
OPTION 1:
feature/course-page/main
feature/course-page/edit
feature/course-page/auto-complete
OPTION 2:
feature_course-page
feature_course-page_auto-complete
OPTION 3:
course-page/edit
course-page/auto-complete
bugfix/course-upload-image
Last thoughts
- Do whatever you want locally but invest a minute squashing and commenting before pushing
- Follow convention with branch names
- Use sub branches when working on the same feature
- Delete your remote branch after merging
- Make sure that the required backend version is deployed before merging to master
- Don't use plastic cup-
Fin
Github Flow
By Gabi Mor
Github Flow
- 579