Git: rimuovere un tag o un branch sul server remoto
Published 2011-12-08
Qui puoi trovare i comandi per rimuovere un tag o un branch su un server remote GitFaccio fatica a ricordarmi i comandi per rimuovere un tag o un branch da un repository Git sul server remoto.
In realtà non è così difficile se ci ricordiamo della sintassi del comando
git push,
Scott Chacon lo spiega vbene nel suo libro
ProGit book.
A way to remember this command is by recalling the
git push [remotename] [localbranch]:[remotebranch]
If you
leave off the [localbranch] portion, then you’re basically saying, "Take
nothing on my side and make it be [remotebranch]".
Quindi si tratta solo di fare un push di un branch/tag vuoto al branch/tag remoto.
Supponiamo che remotename è origin
e remotebranch è
serverfix
, il comando per rimuovere un branch remote è:
$ git push origin :serverfix
e quello per rimuovere un tag remoto è:
$ git push origin :refs/tags/serverfix
Danilo