Created
July 9, 2017 00:04
-
-
Save raphaelfruneaux/41904f31fa782bee01c2d5826e03255e to your computer and use it in GitHub Desktop.
Git: Renomeando uma tag
Fonte: http://stackoverflow.com/a/16251698/2788008
This file contains hidden or 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_antigo nome_novo | |
# | |
# 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