I'm having trouble creating a git alias to delete a tag remotely.
I have the following in my .gitconfig
:
[alias]
deltag = push origin :refs/tags/$1
Running the deltag
alias after deleting a tag locally (with git tag -d testtag
) results in this error:
$ git deltag testtag
error: src refspec testtag does not match any.
error: failed to push some refs to 'ssh://........'
Attempting to run this alias before deleting it locally results in this instead:
$ git deltag testtag
remote: warning: Deleting a non-existent ref.
To ssh://........
- [deleted] $1
What is the correct syntax to use for this alias?