Git tag quickstart
Tags are basically a way to... well, tag a point in time on a git repo. Let's say you finally finished dev work on your new project and a ready to release it into production. You might want to go back to the state of your application at version 1.0 in the future. Don't just leave a comment in the git log, tag it!
$ git tag -a <tag name> -m "comment here"
$ git tag -a v1.0 -m "First version of app release to production
Let's see what tags are in this branch
$ git tag
v.10
Now let's jump into that tag and look around.
$ git checkout tags/v.10
Fyi, this puts you in a detached state. Let's checkout into a branch so we can mess around
$ git checkout -b oldver v1.0
Pushing Git Tags
You can push a tag to your remote repo (origin) with the following
git push origin <tag name>
You can also run this command to verify your tag was pushed out
git ls-remote --tags origin
Annotated vs Lightweight Tags
Annotated tags have a commit message (like we sepficied above) as well as extra information about the tag. See the docs for more details.