Skip to content

Instantly share code, notes, and snippets.

@cottsak
Last active June 2, 2020 06:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cottsak/413c824d93217fbb801774322410ea66 to your computer and use it in GitHub Desktop.
Save cottsak/413c824d93217fbb801774322410ea66 to your computer and use it in GitHub Desktop.
some useful git alias commands
[alias]
st = status # press less keys and live longer
co = checkout
ac = !git add . && git commit -am # add everything, commit and supply message
fukd = !git reset --hard && git checkout . && git clean -df # nuke the working directory. I just want to start again
coto = branch --sort=-committerdate # I want to change branches, which are my recent ones again?
oc = commit -a --amend -C HEAD # I just fixed a small thing that should be in my last commit
git = !exec git
@cottsak
Copy link
Author

cottsak commented Sep 27, 2017

Thanks to http://caiustheory.com/git-git-git-git-git/ for the git = !exec git - now I get some precious life seconds back

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