简体   繁体   中英

Gitflow tagging of develop branch?

It is necessary for our develop branch to be tagged because our build process takes the tag name as the semver build version, eg v3.5.1. Develop branch can be built any time and deployed to staging server automatically.

However, gitflow model only describes how and when to tag master branch. If I start tagging develop branch as well, I will "lose" those names and won't be able to use them for tagging master branch.

I could for example tag the develop branch to something bigger than current master, every time I tag the master. But then I would have to remember to next time tag the master to something bigger than previous develop tag.

Any other advice how to manage this workflow?

There are basically two types of references in Git:

  • tags, which are put by the user, and which aren't supposed to move
  • branches, which are updated by Git itself

So, if you plan to put regularly tags with no real semantic, you're more or less re-inventing the concept of branch. But you're managing it manually.

To put it in a nutshell: my advice to manage this workflow would be to adapt a bit the build tool, to ensure that it doesn't only takes into account tags, but that it can also take into account the develop branch.

(It would probably not be too hard to do, because git can often be given a tag name or a branch name without change in semantic)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM