Skip to content

Instantly share code, notes, and snippets.

View liviocunha's full-sized avatar
🏠
Working from home

Lívio Cunha liviocunha

🏠
Working from home
View GitHub Profile
@davidalves1
davidalves1 / desfazendo-push.md
Last active July 1, 2024 14:48
Desfazendo um git push

Desfazendo um git push

Não é possível desfazer um push diretamente, como é feito com o commit utilizando o comando $ git reset --soft|mixed|hard hash-do-penultimo-commit

Para desfazer um push são necessários 3 passos:

  1. Utilizar o comando $ git reset --mixed HEAD~1 e em seguida utilizar o comando $ git stash (se preferir pode usar a opção -m "revertendo o push blablabla" para salvar o stash com um contexto do que foi feito
  2. Utilizar o comando $ git revert HEAD~0
  3. Utilizar o comando $ git stash apply
  4. Utilizar o comando $ git push origin sua-branch -f
@luzfcb
luzfcb / configurar_pyenv.md
Last active June 11, 2024 15:17
instalar pyenv no ubuntu
@betrcode
betrcode / README.md
Created June 24, 2014 06:36
Using Python to check if remote port is open and accessible.