Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nickarthur/23be14b51d2506843a45bd75a25c4ee7 to your computer and use it in GitHub Desktop.
Save nickarthur/23be14b51d2506843a45bd75a25c4ee7 to your computer and use it in GitHub Desktop.
Git: Commands
# guardar comando de push para o origin depois de um 'git remote add'
git push -u origin master
# diferenças entre as alterações locais e o HEAD
git diff HEAD
# mostra apenas a diferença no staged
git diff --staged
# remove do staged
git reset file
# remove latest commit
git reset --hard HEAD^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment