Skip to content

Instantly share code, notes, and snippets.

@toabr
Created October 22, 2021 08:11
Show Gist options
  • Save toabr/c17fc1479e9946c281dd9a48e2aa77e8 to your computer and use it in GitHub Desktop.
Save toabr/c17fc1479e9946c281dd9a48e2aa77e8 to your computer and use it in GitHub Desktop.
Git aliases
[alias]
st = status
cm = commit -m
cam = commit -a -m
acm = !git add -A && git commit -m
co = checkout
cob = checkout -b
del = branch -D
br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate
save = !git add -A && git commit -m 'chore: savepoint'
undo = reset HEAD~1 --mixed
res = !git reset --hard
done = !git push origin HEAD
last = log -1 HEAD --stat
ll = !git log --pretty=format:\"%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) [%an]\" --abbrev-commit -30
unstage = reset HEAD --
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment