Last active
February 20, 2018 17:22
-
-
Save claudiosteuernagel/b6a5e12237ddf9534443 to your computer and use it in GitHub Desktop.
Git commands
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
Git commands |
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
REMOVER COMMIT ANTIGOS - REMOVER UM COMMIT DO MEIO DA PILHA | |
git rebase --onto 0f94f0b5e8cc8f0ca0d95545b3953b7515a1939c 4a9da34153312eb3b95facae576594199d967e3e | |
onde: | |
> 0f94f0b5e8cc8f0ca0d95545b3953b7515a1939c >> commit anterior ao commit que será removido | |
> 4a9da34153312eb3b95facae576594199d967e3e >> commit que será removido | |
-------------------- | |
EXEMPLO: | |
Pilha de commits: | |
-- | |
commit 4bbdc8d61dd9efdf86d368b16a8d66d0b7701d42 | |
Author: Marcio Trindade | |
Date: Tue Jul 14 00:32:07 2009 -0300 | |
fixed feed | |
commit 4a9da34153312eb3b95facae576594199d967e3e | |
Author: Marcio Trindade | |
Date: Mon Jul 13 10:21:16 2009 -0300 | |
add RedCloth | |
commit 0f94f0b5e8cc8f0ca0d95545b3953b7515a1939c | |
Author: Marcio Trindade | |
Date: Mon Jul 13 00:12:40 2009 -0300 | |
remove redirect to .htaccess | |
-- | |
git rebase --onto 0f94f0b5e8cc8f0ca0d95545b3953b7515a1939c 4a9da34153312eb3b95facae576594199d967e3e | |
OU | |
git rebase --onto HEAD~2 HEAD~1 | |
-- | |
Resultado: | |
commit 4bbdc8d61dd9efdf86d368b16a8d66d0b7701d42 | |
Author: Marcio Trindade | |
Date: Tue Jul 14 00:32:07 2009 -0300 | |
fixed feed | |
commit 0f94f0b5e8cc8f0ca0d95545b3953b7515a1939c | |
Author: Marcio Trindade | |
Date: Mon Jul 13 00:12:40 2009 -0300 | |
remove redirect to .htaccess | |
-------------------------------------- |
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
EXCLUIR UMA TAG DO SERVIDOR: | |
git tag -d NOME_TAG | |
git push origin :refs/tags/NOME_TAG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment