git 版本控制系统(VCS)
git 版本号 (x.y.z)
- X = 主版本号 (重大升级, 不同主版本的库之间是不兼容的)
- Y = 次版本号 (增量升级,增加一些新的接口但保留原有接口.高版本号的库向后兼容低版本的库)
- Z = 维护版本号 (仅修复 Bug) (修改错误,改进性能等,不添加新接口,也不更改接口.在主版本和次版本相同的前提下,不同维护版本之间完全兼容
Git Flow代码示例
a. 创建develop分支
git branch develop
git push -u origin develop
b. 开始新Feature开发
git checkout -b feature-some develop
# Optionally, push branch to origin:
git push -u origin feature-some
# 做一些改动
git status
git add some-file
git commit
c. 完成Feature
git pull origin develop
git checkout develop
git merge --no-ff feature-some
git push origin develop
git branch -d feature-some
# If you pushed branch to origin:
git push origin --delete feature-some
d. 开始Relase
git checkout -b release-1.1.0 develop
# Optional: Bump version number, commit
# Prepare release, commit
e. 完成Release
git checkout master
git merge --no-ff release-1.1.0
git push
git checkout develop
git merge --no-ff release-1.1.0
git push
git branch -d release-1.1.0
# If you pushed branch to origin:
git push origin --delete release-1.1.0
git tag -a v1.1.0 master
git push --tags
f. 开始Hotfix
git checkout -b hotfix-1.0.1 master
g. 完成Hotfix
git checkout master
git merge --no-ff hotfix-1.0.1
git push
git checkout develop
git merge --no-ff hotfix-1.0.1
git push
git branch -d hotfix-1.0.1
git tag -a v1.0.1 master
git push --tags
转自 https://www.icetdpl.com/posts/Git-Flow/
标签:origin,git,develop,--,Flow,Git,push,checkout From: https://www.cnblogs.com/icetdpl/p/17867256.html