Created
June 19, 2015 17:57
-
-
Save bytefade/d97882f91532bbf931a7 to your computer and use it in GitHub Desktop.
Git stash, quando você trabalha em branch errado.
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
$ git stash | |
$ git stash branch temporario | |
$ git checkout nova-consulta | |
$ git merge --no-ff temporario | |
$ git branch -d temporario | |
Com o git stash eu peguei minhas mexidas e guardei em lugar seguro. Nisso, o master voltou a ficar com o conteúdo correto. Ufa! | |
Com o git stash branch temporario eu criei um branch com elas, de nome temporario. | |
Com o git checkout eu entrei no branch correto, nova-consulta | |
Com o git merge eu peguei a minha mexida, que agora está no branch temporario, e incorporei ao branch correto (nova-consulta) :-) | |
Com o último comando eu apaguei o branch temporario |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment