This is just a quick memo to remember how to add tags to repositories.
For exiting commit:
- List all commits:
git log --pretty=oneline
- Pick the one you wish to tag (first seven letters of the has are enough), i.e.:
- Add a tag:
git tag -a 0.1.0 32c274c -m "First version before general refactor"
For latest commit:
git tag -a 1.4.5 -m "My version 1.4.5".
Tags are always added to local repository and never pushed to remote by default. You have to explicitly tell git to do so. For example, by executing
git push --tags.