0
0
Gitdevops~15 mins

Deleting tags in Git - Mini Project: Build & Apply

Choose your learning style9 modes available
Deleting Git Tags
📖 Scenario: You are working on a project using Git for version control. Sometimes, you create tags to mark important points in your project history. Now, you need to clean up some tags that are no longer needed.
🎯 Goal: Learn how to delete local and remote Git tags safely and correctly.
📋 What You'll Learn
Create a local Git tag named v1.0
Create a local Git tag named v2.0
Delete the local tag v1.0
Delete the remote tag v2.0
Verify the tags after deletion
💡 Why This Matters
🌍 Real World
Deleting tags helps keep your Git repository clean and organized by removing outdated or incorrect version markers.
💼 Career
Knowing how to manage Git tags is important for software developers and DevOps engineers to maintain clear version control and deployment processes.
Progress0 / 4 steps
1
Create local Git tags
Create two local Git tags named v1.0 and v2.0 using the commands git tag v1.0 and git tag v2.0.
Git
Need a hint?

Use git tag followed by the tag name to create a tag.

2
Delete the local tag v1.0
Delete the local Git tag named v1.0 using the command git tag -d v1.0.
Git
Need a hint?

Use git tag -d followed by the tag name to delete a local tag.

3
Delete the remote tag v2.0
Delete the remote Git tag named v2.0 from the remote repository named origin using the command git push origin --delete tag v2.0.
Git
Need a hint?

Use git push origin --delete tag followed by the tag name to delete a remote tag.

4
Verify remaining tags
List all local Git tags using git tag to verify that only v2.0 remains locally after deleting v1.0.
Git
Need a hint?

Use git tag without arguments to list all local tags.