Tags
Tags are a great way of labelling the git pushes as you progress through the development of your code.
When you execute the command git push origin <tag id>, you are adding a tag to the remote repo against the current commit
You need to follow these steps
Create a git repo as normal
Make changes to the code base
git add .
git commit -m <message>
git tag -a <tag id> -m <message relating to the tag>
git push origin master
git push origin <tag id>
Lines 6 and 7 can be swapped.
The reason for line 7 is because by default git push does not push the tags. Tags have to be explicitly passed to git remote.
To push multiple tags simultaneously pass the --tags option to git push
command. When another user clones or pulls a repo they will receive the new tags.
Use the following convention for <tag id> vX.Y e.g. v1.4
As an example here is a git tag command - git tag -a v1.4 -m “some message”
Use this batch script to do the heavy lifting
git add .
git commit -m %2
git tag -a %1 -m %2
git push origin master
git push origin %1
Great write up on tags https://www.atlassian.com/git/tutorials/inspecting-a-repository/git-tag