有效利用git brach特性的開發模型!
主要分成下列branch:
- master (主要)
- develop (開發)
- feature (功能)
- release (釋出)
- hotfix (重大修正)
Ref: git-flow cheatsheet
# 初始化git flow braching model
git flow init
# 開新feature
git flow feature start FEATURE_NAME
# 結束feature
git flow feature finish FEATURE_NAME
# [協作] 發佈feature
git flow feature publish FEATURE_NAME
# [協作] 取得feature
git flow feature pull FEATURE_NAME
# 釋出階段 開版號
git flow release start VERSION_NAME
# [協作] 允許其他開發者提交 commit
git flow release publish VERSION_NAME
# 正式釋出
git flow release finish VERSION_NAME
# push tag to remote
git push --tags
# 重大修正 開版號
git flow hotfix start VERSION_NAME
# 打上patch後再次釋出
git flow hotfix finish VERSION_NAME
OS: 幹 我還是用UI好了啦 >>Sourcetree