Gitflow
🧨Delete a Bad Tag Locally and RemoteEasy+350 XP
Workshop
Scenario reference

Delete a Bad Tag Locally and Remote: the situation, step by step

The situation

You tagged `v2.0.0` on the wrong commit and pushed. CI already kicked off a release build. You need to delete the tag — fast.

Delete locally with -d, delete remote with `push --delete`.

Easy · 2 steps · +350 XP

What you will practice

This scenario walks through 2 steps, in order:

  1. 01Delete the local tag
  2. 02Delete the remote tag
Reveal the step-by-step commands

Try the terminal first — you learn more by doing. When you want to check yourself, here is the command for each step.

  1. 1. Delete the local tag
    git tag -d v2.0.0
  2. 2. Delete the remote tag
    git push origin --delete v2.0.0

Key takeaway

git tag -d <tag>; git push origin --delete <tag>. Then retag correctly.