If you are working with Git to keep track of project changes you then using tags is key to be able to keep track of your release versions amongst your commits (i.e. version 1.0, 2.0, 2.1 etc).
Now you can use a Git GUI like Gitkraken to manage this easily however I think it is important to also know how to do it through Command Line.
To list your currently available tags in Git perform the following’
$ git tag
1.0.0
1.1.0
1.1.1
2.0.0
The general reasoning behind the version number format is to state a MAJOR.MINOR.PATCH or BUGFIX so in the example above version 1.1.0 introduced minor but substantial changes to the project in hand, version 1.1.1 fixed some minor bugs or applied a security patch (for example) and version 2.0.0 introduced some major updates to that project.
To create a new new tag do the following
$ git tag -a 2.1.0 -m 'v2.1.0
And then you can push to your remote repository
$ git push --tags origin master
If you need to removed the current tag version for whatever reason
$ git tag -d 2.1.0
Deleted tag '2.1.0' (was 074205)
Remove the current tag version remotely
$ git push origin :refs/tags/2.1.0
To git@bitbucket.org:webtise/sagepaysuitepro.git
- [deleted] 2.1.0
There is alot more to tagging but this covers the day to day basics.