Skip to content

Instantly share code, notes, and snippets.

@lorefnon
Created May 1, 2016 19:48
Show Gist options
  • Save lorefnon/7a5a0d4d8ed78ed25dc72a14644565fb to your computer and use it in GitHub Desktop.
Save lorefnon/7a5a0d4d8ed78ed25dc72a14644565fb to your computer and use it in GitHub Desktop.
[alias]
l = log
i = init
cl = clone
d = diff
dn = --no-pager diff --name-only
di = icdiff
pr = pull-request
dc = diff --cached
dci = icdiff --cached
dic = icdiff --cached
f = fetch
m = merge --no-edit
st = stash
stp = stash pop
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg = !"git lg1"
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
lf = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
la = "!git config -l | grep alias | cut -c 7-"
cp = cherry-pick
s = status
a = add
c = commit
st = status -s
cl = clone
com = "!git add . ; sh -c \"git commit -m $1\""
cop = "!git checkout $(git branch | peco)"
co = checkout
cof = "! sh -c \"git co $1\" ; sh -c \"git co -b $1\""
b = branch
br = browse
pl = pull
ps = push
dw = diff --word-diff
r = reset
r1 = reset HEAD^
r2 = reset HEAD^^
rh = reset --hard
rh1 = reset HEAD^ --hard
rh2 = reset HEAD^^ --hard
stl = stash list
sta = stash apply
sts = stash save
cob = "!git for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)' | peco | xargs git checkout"
coi = "!sh -c \"git co WEB-$1\" -"
cne = "!git add . ; git commit --no-edit"
c-wip = "!git add . ; git commit -m WIP"
c-enh = "!git add . ; git commit -m 'Enhancements'"
c-fix = "!git add . ; git commit -m 'Fix issue'"
c-cl = "!git add . ; git commit -m 'Cleanup'"
c-uc = "!git add . ; git commit -m 'Update Code'"
c-cu = "!git add . ; git commit -m 'Update Code'"
c-an = "!git add . ; git commit -m 'ANNOTATE!!!'"
cdr = "!cd `git rev-parse --show-toplevel`"
erf = "!emacs -nw -Q $(git log --pretty=format: --name-only --since='7 days ago' | peco )"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment