'develop' 和 'master' 的生命周期是无限的,将 GitHub 远程 'origin/develop' 分支合并和标记到远程 'origin/master' 而远程'master' 领先于远程'develop' 的最佳工作流程是什么?
用于更新文件(自述文件)和标记“主”的方案...
一切都同意...
$ git log develop ^master
$ git log master ^develop
$ git log master ^origin/master
$ git log master ^origin/develop
$ git log develop ^origin/develop
$ git log develop ^origin/master
切换到“开发”...
**$ git branch**
* develop
master
编辑 README.md 文件。
提交到本地回购...
**$ git commit -a**
[develop 47c8393] Updated branching model
1 file changed, 18 insertions(+), 6 deletions(-)
rewrite README.md (81%)
将“开发”推送到远程“开发”...
**$ git push origin develop**
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 745 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
To git@github.com:xxx/xxx.git
038cb2b..47c8393 develop -> develop
切换到“大师”...
**$ git checkout master**
Switched to branch 'master'
将“开发”合并为“大师”...
**$ git merge --no-ff develop**
Merge made by the 'recursive' strategy.
README.md | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
标记“大师”...
**$ git tag -a v3.0.2**
将'master'推送到远程'master'......
**$ git push --tags origin master**
Counting objects: 2, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 442 bytes, done.
Total 2 (delta 0), reused 0 (delta 0)
To git@github.com:xxx/xxx.git
038cb2b..5750fa7 master -> master
* [new tag] v3.0.2 -> v3.0.2
GitHub 现在报告远程“master”比远程“develop”(合并)早 1。他们不应该同意吗?...
**$ git log origin/master ^origin/develop**
commit 5750fa78ff81f41ef2327c2f4595f98c0413e245
Merge: 038cb2b 47c8393
Author:
Date:
Merge branch 'develop'
如果'master'合并回'develop',HEAD指向'develop',这是一个问题吗?新的“开发”是否应该从新的“主”分支(不支持“开发”的无限寿命)?