Skip to content

Instantly share code, notes, and snippets.

View edsonBJR's full-sized avatar
🎯
Focusing

Edson Barbosa Junior edsonBJR

🎯
Focusing
  • Maringá - Paraná
  • 23:33 (UTC -12:00)
  • X @ebjrtux
View GitHub Profile
@filipelenfers
filipelenfers / installJdkTarGzUbuntu.sh
Last active June 15, 2024 14:33
Install JDK from tar.gz Ubuntu
#Login as root
sudo su
#create jdk directory
mkdir /opt/jdk
#uncompress, change to your file name
tar -zxf jdk-8u5-linux-x64.tar.gz -C /opt/jdk
#check if files are there
@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
@ericelliott
ericelliott / .gitignore
Created November 15, 2016 19:51
Sample Node project .gitignore
node_modules
build
npm-debug.log
.env
.DS_Store