具有语义版本控制的git-flow修补程序

时间:2015-03-03 20:42:30

标签: git git-branch git-flow git-tag

http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/的Jeff教程之后,我使用标准设置初始化了git flow:

[~/tmp/test]
$ git init
Initialized empty Git repository in /Users/nrm/tmp/test/.git/

[~/tmp/test (master)]
$ git flow init
No branches exist yet. Base branches must be created now.
Branch name for production releases: [master]
Branch name for "next release" development: [develop]

How to name your supporting branch prefixes?
Feature branches? [feature/]
Release branches? [release/]
Hotfix branches? [hotfix/]
Support branches? [support/]
Version tag prefix? []

[~/tmp/test (develop)]
$

我按照教程直到“#34; Hotfixing生产代码"”部分。在那里,修补程序分支命名为" assets":

$ git flow hotfix start assets
Switched to a new branch 'hotfix/assets'

Summary of actions:
- A new branch 'hotfix/assets' was created, based on 'master'
- You are now on branch 'hotfix/assets'

Follow-up actions:
- Bump the version number now!
- Start committing your hot fixes
- When done, run:

     git flow hotfix finish 'assets'

但是,当修补程序分支关闭时,教程会指出The hotfix was tagged '0.1.1'。怎么会?我正在使用git-flow: stable 0.4.1

当我按git flow hotfix finish 'assets'关闭此修补程序时,该标记等于修补程序分支名称:

$ git flow hotfix finish assets
                         ^^^^^^
Switched to branch 'master'
Merge made by the 'recursive' strategy.
 assets.txt | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 assets.txt
Switched to branch 'develop'
Merge made by the 'recursive' strategy.
 assets.txt | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 assets.txt
Deleted branch hotfix/assets (was 08edb94).    

Summary of actions:
- Latest objects have been fetched from 'origin'
- Hotfix branch has been merged into 'master'
- The hotfix was tagged 'assets'
                 ^^^^^^^^^^^^^^^
- Hotfix branch has been back-merged into 'develop'
- Hotfix branch 'hotfix/assets' has been deleted

实际上,我希望两者都有。使用某些字符串命名修补程序分支(例如,"示例中为资产"),与标记名称无关。像

这样的东西
$ git flow hotfix finish assets --with-tag 1.0.1

导致

$ git flow hotfix finish assets --with-tag 1.0.1

Switched to branch 'master'
Merge made by the 'recursive' strategy.
 assets.txt | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 assets.txt
Switched to branch 'develop'
Merge made by the 'recursive' strategy.
 assets.txt | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 assets.txt
Deleted branch hotfix/assets (was 08edb94).
               ^^^^^^^^^^^^^

Summary of actions:
- Latest objects have been fetched from 'origin'
- Hotfix branch has been merged into 'master'
- The hotfix was tagged '1.0.1'
                         ^^^^^
- Hotfix branch has been back-merged into 'develop'
- Hotfix branch 'hotfix/assets' has been deleted
                 ^^^^^^^^^^^^^

有什么建议吗?

0 个答案:

没有答案