Skip to content

Instantly share code, notes, and snippets.

@znut
Last active June 3, 2016 08:16
Show Gist options
  • Save znut/887a2563a5c7eeb48ab2 to your computer and use it in GitHub Desktop.
Save znut/887a2563a5c7eeb48ab2 to your computer and use it in GitHub Desktop.
[alias]
ls = log --pretty=format:'%C(auto)%h%d %C(bold blue)(%ad)%Creset %s %C(green)<%cn>' --date=relative
lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(auto)%h%d %C(bold blue)(%ar)%C(reset) %C(white)%s%C(reset) %C(green)<%cn>'
lp = log -p
lst = log --stat
s = status
ss = status -s
st = stash
stp = stash pop
sta = stash apply
stl = stash list
plr = pull --rebase
pl = pull
pho = push origin
co = checkout
cof = "!f() { git checkout feature-hotel/$1; }; f"
br = branch
ci = commit -m
cp = cherry-pick
last = log -1 HEAD
rb = rebase
rbc = rebase --continue
rba = rebase --abort
reh = reset --hard
ec = config --global -e
ecl = config --local -e
new = "!f() { git checkout -b feature-hotel/$1; }; f"
del = "!f() { git branch -d feature-hotel/$1; }; f"
mf = "!f() { git merge --no-ff feature-hotel/$1; }; f"
mfo = "!f() { git merge --no-ff origin/feature-hotel/$1; }; f"
get = checkout -b --track
update = fetch --all --tags
dis = checkout -- .
bruu = branch --unset-upstream
unlock = !rm `git rev-parse --show-toplevel`/.git/index.lock
graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '}'; }; f"
lsb = for-each-ref --sort='-authordate:iso8601' --format=' %(authordate:relative)%09%(refname:short)%09%(authoremail)' refs/remotes/origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment