Skip to content

Instantly share code, notes, and snippets.

@lgmkr
Created October 27, 2011 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lgmkr/1319480 to your computer and use it in GitHub Desktop.
Save lgmkr/1319480 to your computer and use it in GitHub Desktop.
git aliases, save in ~/.gitconfig
[alias]
a = add
s = status
st = stash
sta = stash apply
r = rebase
m = merge
ms = merge --squash
# Branching
b = branch
ba = branch -a -v -v
bs = !git-branch-status
bsi = !git-branch-status -i
# Pulling
pl = pull
plr = pull --rebase
ph = push
# Commiting
c = commit
cm = commit -m
cam = commit -a -m
ca = commit -a
co = checkout
# Log
l = log --color --decorate
ls = log --color --stat --decorate
lsp = log --color --stat -p --decorate
lg = log --graph '--pretty=tformat:%Cblue%h%Creset %Cgreen%ar%Creset %Cblue%d%Creset %s'
lga = log --graph '--pretty=tformat:%Cblue%h%Creset %Cgreen%ar%Creset %Cblue%d%Creset %s' --all
l19 = log --graph '--pretty=tformat:%Cblue%h%Creset %Cgreen%ar%Creset %Cblue%d%Creset %s' --all -19
# for complicated branches
lsd = log --graph '--pretty=tformat:%Cblue%h%Creset %Cgreen%ar%Creset %Cblue%d%Creset %s' --all --simplify-by-decoration
ru = remote update
sb = show-branch --sha1-name
ls-del = ls-files -d
ls-mod = ls-files -m # including remote files
ls-new = ls-files --exclude-standard -o
ls-ign = ls-files --exclude-standard -o -i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment