In the words of Github themselves…
At their core, Releases are based on Git tags. Tags mark a specific point in the history of your project, so they’re a great way to indicate a Release.
I do this so that if people would rather use a previous version then it’s easy for them to find. Additionally I often fancy looking back at earlier versions and seeing how the code has improved 😉
I’m sure there are lots of ways to do this, including using the GUI’s and Github’s website. However here’s how I create a tag using the command line in terminal.
Go to the folder root
git tag NAME_OF_TAG -a
Push to Github. If you are ok to push them all then use..
git push --tags
If you want to push a specific one then use
git push origin NAME_OF_TAG
If for whatever reason you need to delete a tag you use
git tag -d NAME_OF_TAG
To check and confirm tags
git tag -l
If you want to tag previous versions that’s also pretty simple. First you need to checkout the version you need. You can do this by looking at your commits in git and finding the one you want to tag.
E.g to go to the very first Base commit I type
git checkout 81b356d
I can then tag it and then push the tag
git tag NAME_OF_TAG git push --tags
Then just jump back onto master or wherever you want to be
git checkout master
Small post but it’s certainly one I will keep referring back to!
Thanks for reading.