Git flow release branches and tags - with or witho

2019-03-07 20:35发布

I have seen multiple contradicting definitions on various git flow related websites. Is there an official recommendation or single source of truth?

Branches: release-1.2.3 or release-v1.2.3

Tags: 1.2.3 or v1.2.3

2条回答
Rolldiameter
2楼-- · 2019-03-07 20:58

Well, basically it is a matter of preference, but I prefer the version with the v, as Semver does it that way and I try to follow that specification as close as possible to get a sane versioning.

It also makes filtering for those Tags easier, as you can press v and then the TAB-key for autocompletion: This will list all the tags (and maybe a few branches), whereas there are several digits a tag could start with.


See also: Is there a standard naming convention for git tags?

查看更多
时光不老,我们不散
3楼-- · 2019-03-07 21:01

Since v stands for version, tags are generally named vX.Y.Z, with X.Y.Z following Semantic Versioning 2.0.0.

This allows for branches X.Y.Z to co-exist with those tags, without having to deal with error message like "fatal: Ambiguous object name" (as in "Ambiguous Names with GIT?").

Note that the tags for Git itself have recently been "adapted" for a surprising reason: see "Code version change “rules”".

查看更多
登录 后发表回答