Tags are like branches, except they don't usually change
There are two types of git tags - annotated and lightweight
Ensure your current directory is that of the cloned repository in the previous practical.
# On a branch or any kind of git-ref git tag v1.2.3-your-name # Check filesystem (ls .git/refs/tags) # Git does not push tags by default to a remote # Or `git push --tags` git push origin v1.2.3-your-name
Now create another tag v99.0.0 before moving onto the next part
# Checkout a tag git checkout v99.0.0 # Create a branch from a tag git checkout -b version-nine-nine v99.0.0 # Delete tags /!\ Careful now /!\ # Local only git tag -d v99.0.0 # Delete from remote git push origin :refs/tags/v99.0.0 # A little bit about annotated tags git tag -s v0.99.0-annotated -m "my tag v0.99.0-annotated" git show v0.99.0-annotated
# LW tags are files on disk with a pointer to a commit ls .git/refs/tags/ # Cat to reveal pointer to a commit cat git/refs/tags/v99.0.0 # Show this commit git show 659220