Removing Local and Remote Git Tags

As I was experimenting with git tags, I ended up with a bunch of them that I didn’t need and I wanted to remove them all. One things to keep in mind is that tags similarly to branches can be local or remote. If you create tags but don’t push them then they’re just local and you can remove them using git tag -d tagname. You do need to specify the exact tag name to do that which you can get by listing all available tags with git tag. But removing them one by one can be tedious so you can combine the two mentioned commands into the following one-liner. ...

February 22, 2025 · Andrius

Using Git Tags and GitHub Workflow

Using git tags is quite easy and can be useful in setting up a simple CI/CD like pipeline i.e. streamlining the process of packaging or deploying your code. First thing you need to do is to create a tag in your git repo, you do this by running git tag v0.1.2 where v0.1.2 is your tag name, usually a version number or some other more human friendly identifier than a commit hash. It doesn’t have to start with v, but it’s a common to do so. Any tag creation that you do takes place on your local machine until you push it to the remote repo with git push --tags. ...

February 19, 2025 · Andrius