Last active
February 16, 2021 18:39
-
-
Save rdeavila/7100671 to your computer and use it in GitHub Desktop.
Git: Renomeando uma tagFonte: http://stackoverflow.com/a/16251698/2788008
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Primeiro cria um alias da tag antiga com um nome novo | |
git tag nome_novo nome_antigo^{} | |
# | |
# Remove a tag antiga localmente | |
git tag -d nome_antigo | |
# | |
# Depois, remove a tag no repositório remoto: | |
# Checkout da fonte remota | |
git remote -v | |
# O terceiro argumento é o seu repositório remoto, | |
# aquele que você acessa com `git remote`. Neste exemplo: `origin` | |
git push origin :refs/tags/nome_antigo | |
# | |
# Finalmente, adicona a nova tag ao repositório remoto. Enquanto você não fizer isso, | |
# a nova tag não vai ser adicionada: | |
git push origin --tags | |
# | |
# Repita este passo em todos os seus repositórios remotos. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
receio que é seja o contrário "git tag nome_novo nome_antigo"