Run these commands to tag with a software revision number and push to remote repo
- git tag -a -m'Release to Customer' 1.2.3
- git push --tags origin master
Don’t forget:
- the –tags when pushing the to the remote git repository
- the -a switch when doing ‘git tag’
Example of how to determine software revision number with ‘git describe’
- git commit -m'Commit One.'
- git tag -a -m'Tag One.' 1.2.3
- git describe # => 1.2.3
- git commit -m'Commit Two.'
- git describe # => 1.2.3-1-gaac161d
- git commit -m'Commit Three.'
- git describe # => 1.2.3-2-g462715d
- git tag -a -m'Tag Two.' 2.0.0
- git describe # => 2.0.0
- git push --tags origin master