Git tag before or after merge?
Depends. Will the branch fast-forward into master
?
If the answer is 'yes' then it doesn't matter whether you tag it before or after doing the fast-forward merge, because the tagged commit will be the same either way.
If the answer is 'no', then you should probably tag it after merging into master
(assuming you cut releases from master
). In general you want your tags to match your releases (to make it easier to look at the version of the code that was released), so you tag the version in the place you're making releases from.
It all depends on your distribution model. If 'master' is your main release line, I would imagine that 1.1 isn't really 'done' until it successfully merges into the main line, in which case, you should tag after merge.
Note: I've seen some projects use master as a dev branch and then have separate branches for 'stable' versions (not a model that I agree with). In the this case, you tag before merge.