We use git to manage our project, we have a branch for each: dev staging production
I want to use git tags to manage versions of the software. As far as I can see if I am on a branch and add a few commits, I then have to run: git tag 1.0
Repacing 1.0 with whatever version number we are up to, then I can push the tag using: git push origin 1.0
And I can update the branch with: git push --tags
But how do I reuse a tag now? If I commit more code to my local repository and want it to be version 1.0 easily? Or do you just add a new tag like 1.1?
Also, what happens if my colleague uses the same tag name on his local repository and we both push the code for that same tag up?
Lastly, what happens if we accidentally push our code without running git tag to tag the commits.
I'm not really getting how tags work, I thought they would work like you would tag a blog post or something - you can tag lots of different commits with the same tag and reuse the tag etc. kind of like a branch I guess.