> git checkout -b releases-1.2 develop Switched to a new branch “release-1.2” > ./bump-version.sh1.2 Files modified successfully. version bumped to 1.2. > git commit -a -m “Bumped version number to 1.2” [release-1.274d9424] Bumped version number to 1.2 1 files changed. 1insertions(+). 1deletions(-)
> git checkout -b hotfix-1.2.1 master Switched to a new branch “hotfix-1.2.1″ > ./bump-version.sh1.2.1 Files modified successfully, version bumped to 1.2.1. > git commit -a -m “Bumped version number to 1.2.1″ [hotfix-1.2.141e61bb] Bumped version number to 1.2.1 1 files changed, 1insertions(+), 1deletions(-)
修复bug并提交。
1 2 3
> git commit -m “Fixed severe production problem” [hotfix-1.2.1 abbe5d6] Fixed severe production problem 5 files changed, 32insertions(+), 17deletions(-)
结束一个热补丁分支
修复完成后,热补丁分支需要合并回master并打上标签,同时也需要被合并回develop。
1 2 3 4 5
> git checkout develop Switched to branch ‘develop’ > git merge –no-ff hotfix-1.2.1 Merge made by recursive. (Summary of changes)