How can I use tags in Git?


Today, you’ll see how you can use tags in Git. Tags allow you to mark important points in your project’s history - for example, a release.

Let’s mark one of our commits and tag it as “version 1”. Simply right-click the commit you want to tag and select “Create new tag”. You can then provide a name for the tag. And, optionally, a descriptive message.

Tower then shows the tag in two places:

  • First, you’ll find it as a badge on the commit item in the list.
  • And second, you’ll find it in the “tags” section in the sidebar.

This is where Tower lists all of the tags in your local repository. To see that optional message that a tag can have, simply wait for the tooltip to show.

Deleting a tag is as easy as right-clicking it and selecting “delete”.

Before we finish this video, there’s one more thing to know: When you push changes to a remote repository, tags are NOT automatically included. You have to explicitly tell Git if you want to also push tags. You can do this here in the Push dialog.

That’s it for now. Thanks for watching - and see you soon in our next video!