Skip to content

Instantly share code, notes, and snippets.

@hemkaran
Last active June 17, 2021 07:51
Show Gist options
  • Save hemkaran/72257407e113db2e15cebaeb81f6fe24 to your computer and use it in GitHub Desktop.
Save hemkaran/72257407e113db2e15cebaeb81f6fe24 to your computer and use it in GitHub Desktop.
Git alias for faster use of git commands
[alias]
co = checkout
s = status
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
br = branch
go = push origin HEAD
gof = push origin HEAD --force
lg = !git log --pretty=format:\"%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) [%an]\" --abbrev-commit -30
st = stash
stp = stash pop
ll = log --oneline
last = log -1 HEAD --stat
cm = commit -m
d = diff
dv = difftool -t vimdiff -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment