Skip to content

Instantly share code, notes, and snippets.

@ivanbtrujillo
Created July 8, 2020 14:41
Show Gist options
  • Save ivanbtrujillo/788b0fed088f6d7cb6fdf6dd42b70415 to your computer and use it in GitHub Desktop.
Save ivanbtrujillo/788b0fed088f6d7cb6fdf6dd42b70415 to your computer and use it in GitHub Desktop.
Git aliases

GIT USEFULL ALIASES

Remove last commit:

git config --global alias.rm-commit 'reset --hard HEAD~1'  

USAGE:

git rm-commit

Remove last commit but keeping the changes

git config --global alias.edit-commit 'reset --soft HEAD~1'

USAGE:

git edit-commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment