I've been using git for about a year and would like to use tagging to, well, tag commits at different versions. I've found lots of info on the commands to use to work with tags, but what I'd like to know is why use tagging at all if I can just create a new branch called 1.1.0
and not have to cloud my mind with a whole new set of git commands?
There has to be a lot of good reasons for tagging rather than branching but I'd like to know what those advantages are.
Whereas you can create a branch named "1.0.0" - you, or anyone with commit rights, can also then simply push to that branch (deliberately or not) and change what 1.0.0 means.
You can't do that with a tag, once you create a tag - that's it; Tag 1.0.0 means exactly that and can't be changed*.
That's the main practical difference between a tag and a branch
* You can delete and recreate a tag thereby changing a tag, but certainly not by accident.