Skip to content

Instantly share code, notes, and snippets.

View pransteter's full-sized avatar
🦍

Rômulo Pransteter pransteter

🦍
  • Sorocaba/SP
View GitHub Profile
@bytefade
bytefade / git-stash
Created June 19, 2015 17:57
Git stash, quando você trabalha em branch errado.
$ 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) :-)
@ainsofs
ainsofs / gist:2b80771a5582b7528d9e
Created April 16, 2015 01:50
Clear .gitignore cache
# remove specific file from git cache
git rm --cached filename
# remove all files from git cache
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"