Gitflow: git-flow `tag` commit location on finishing release

Created on 30 Sep 2015  ·  4Comments  ·  Source: nvie/gitflow

It is my understanding from the page http://nvie.com/posts/a-successful-git-branching-model/, where I first learned the git-flow model about 2 years ago, that a tag would always be on the commit where the release branch was merged with master.

I've recently installed git-flow plugin for Git Extensions and the tag is being applied to the last commit on the release branch and not on the merged commit on the master branch.

Is this a bug? Does it really matter which one the tag is on? My workaround is manual process of deleting the tag and recreating it where I learned to have it created.

Most helpful comment

From my understanding placing the tag on the release branch before merging (and not on the master branch) is in fact the correct thing to do so it can be found by git describe --tags from the develop branch, too. See #374

All 4 comments

I just ran into the same issue with the same understanding you have @RoLYroLLs. Here's a quote from the article:

When the state of the release branch is ready to become a real release, some actions need to be carried out. First, the release branch is merged into master (since every commit on master is a new release by definition, remember). Next, that commit on master must be tagged for easy future reference to this historical version.

Hope this gets fixed, as I have to do the same delete and recreate dance, you mentioned.

Ok I did some playing around with this and I found out how to get it "fixed", if you will, to the methodology written at http://nvie.com/posts/a-successful-git-branching-model/.

I feel this project has been abandoned since the last time it was touched was in 2012, so I will not create a PR, but i will leave this issue active.

However, for those of you like me you can edit the following files:

https://github.com/nvie/gitflow/blob/15aab26490facf285acef56cb5d61025eacb3a69/git-flow-release#L253
and
https://github.com/nvie/gitflow/blob/15aab26490facf285acef56cb5d61025eacb3a69/git-flow-hotfix#L297

Change $BRANCH to $MASTER_BRANCH

From my understanding placing the tag on the release branch before merging (and not on the master branch) is in fact the correct thing to do so it can be found by git describe --tags from the develop branch, too. See #374

From my understanding placing the tag on the release branch before merging (and not on the master branch) is in fact the correct thing to do so it can be found by git describe --tags from the develop branch, too. See #374

That was a strange argument.
Source are versioned so you can correlate deployed applications with the source that created it, you are deploying from master -> master shall be tagged.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andremedeiros picture andremedeiros  ·  34Comments

nvaken picture nvaken  ·  5Comments

boryn picture boryn  ·  6Comments

OJ picture OJ  ·  29Comments

primeminister picture primeminister  ·  4Comments