I use TortoiseGit, with default options, ie, merge with ff.
Applicable for hot-fixes and small features.
Branch Naming
Prefix the branch name with the issue# then follow by a short subject, eg, 757_duplicate_order
Commit Message
Start the commit message with issue# in square bracket follow by more object name in square brackets, and then by verb in past tense, eg, [issue#757][order] Fixed duplicate orders.
Subflow 1 Inital commit
- 
Switch/Checkoutmaster.
 This step is crucial. Make sure you are on the MASTER branch.
- 
Git Pullfrom remote
- Now, implement the hot-fixes and test in development until they are ready to commit
- 
Git Commit, select new branch and input a name say hotfix (chosen for brevity, please follow branch naming convention above)
- Select the files to commit and click OK
Subflow 2 When we are ready to test hotfix in staging:
- 
Switch/Checkoutstaging
- 
Git Pullfrom remote
- 
Git Mergefrom branch hotfix, default options, click OK
- 
Git Pushstaging to remote
- Predeploy staging in Jenkins. Go to Build History, Console Output and verify Changed Files.
- Deploy staging in Jenkins
- Test in staging
Subflow 3 Continue with more changes in hotfix:
- 
Switch/Checkouthotfix
- 
Git Committo hotfix
- Go to subflow 2
Subflow 4 When we are ready to deploy to master:
- 
Switch/Checkoutmaster
- 
Git Pullfrom remote
- 
Git Mergefrom branch hotfix, default options, click OK
- 
Git Pushmaster to remote
- Predeploy master in Jenkins. Go to Build History, Console Output and verify Changed Files.
- Deploy master in Jenkins
After that, the branch hotfix can be deleted.
Posted by kiatng to Git (2015-03-05 07:36)