Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»GIT»How to delete Git tags

    How to delete Git tags

    By RahulOctober 25, 20211 Min ReadUpdated:October 25, 2021

    Tags work as an additional identifier for a particular incident. And in the case of Git, Tags are used as the reference points in your development workflow and it denotes special events like a new version release or new commit. You can create a new tag to give a reference for your newly launched version.

    Advertisement

    We use tags for future reference of our previous releases and commits. And we can create and delete as per our convenience.

    1. To delete a tag from a local repository, We can use the “git tag -d” command followed by the tag name you want to delete. For example:
      git tag -d [tagName]
      

      So if you want to delete a tag v1.4 then you can execute:

      git tag -d v1.4 
      
    2. To delete tags from the remote repository, Execute the following command:
      git push origin --delete origin [tagName] 
      
    3. You can also use the git push command to delete a tag by specifying the tag name by refs syntax.
      git push origin :refs/tags/[tagName] 
      
    4. If you want to check if your tags have been deleted or not then you can list them all using “-l”
      git tag -l 
      

    git tags
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Git Change Remote URL: How to

    Git Change Remote URL in Local Repository

    Git Change Remote URL to SSH (from HTTPS)

    How to Create Branch in Git Repository

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Backing Up Your Linux System with Rsync: A Step-by-Step Guide
    • Sort Command in Linux with Practical Examples
    • How to Install and Use Flask in Fedora 37/36
    • Sed Command in Linux with 15 Practical Examples
    • How to Print a List without Brackets in Python
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.