git delete remote tag script

php | git

Copy the following code, create a file called e.g., and place it in a bin dir. Make it executable with chmod +x Then run it as e.g. 1.3.234. Now your remote tag will be gone.

#!/usr/bin/env php

 * Delete Remote tag: 
 * Usage git_tag_delete 1.0.234

if (isset($argv[1])) {
    $tag = $argv[1];
} else {
    echo "Set tag to delete as argument" . PHP_EOL;

$git_delete = "git tag -d $tag ";
$git_push = "git push origin :refs/tags/$tag";

This page has been viewed 1587 times. First hit: 30-Oct-2015 16:56:17
Share email, Google+, Twitter, Facebook.
comments powered by Disqus