Skip to content

Instantly share code, notes, and snippets.

@fishman
Created June 10, 2013 14:25
Show Gist options
  • Save fishman/5749088 to your computer and use it in GitHub Desktop.
Save fishman/5749088 to your computer and use it in GitHub Desktop.
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[push]
default = current
[alias]
dupes = !"git ls-tree -r HEAD | cut -c 13- | sort | uniq -D -w 40"
reword = commit --amend --only -v --
amend = commit --amend
rank = shortlog -sn --no-merges
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short
whois = log -i -1 --pretty='format:%an <%ae>'
fixup = !sh -c 'git commit --fixup=$1 ${@:2}' -
rollback = !sh -c 'git reset --merge HEAD~${1-1}' -
patch = add -p
staged = diff --cached
; sci = !sh -c \"git stash && git svn dcommit && git stash apply\"
; age = ls-files --exclude-per-directory=.gitignore \
; su = !sh -c \"git stash && git svn rebase && git stash apply\"
age = !git ls-files | xargs -n1 -i{} git log -1 --pretty=format:'%ci {}' {}
co = checkout
dstat = diff --stat
orcep = push origin +master
kill1 = rebase -i HEAD~1
last = cat-file commit HEAD
lg = log --graph --abbrev-commit --date=relative
lga = log --graph --abbrev-commit --decorate --all
log1 = log --pretty=oneline --abbrev-commit
mergehub = !sh -c \"git stash && git fetch github && git merge github/master && git stash apply\"
nvgc = !ionice -n7 nice -n20 git vgc
push-head = !git-push origin `git-symbolic-ref HEAD`
rlog = log --pretty=format:\"%h %Cblue%cr%Creset %cn %Cgreen%s%Creset\"
sci = svn dcommit
su = svn rebase
st = status --short
stc = diff --stat --name-status --cached
tip = log -1
top = !eval cd "$(pwd)/$(git rev-parse --show-cdup)" && pwd
up = !git stash && git pull --rebase && git stash apply
vgc = repack -f -a -d --depth=250 --window=250
wu = log --stat origin..@{0}
wup = log -p origin..@{0}
subupdate = !git submodule update --init
subrepull = !git submodule foreach "git pull"
; repull = !git reset --hard && git clean -f -d && git submodule foreach 'git reset --hard && git clean -f -d' && git pull --recurse-submodules && git submodule update --init
; subreset = !git submodule foreach "git reset --hard && git clean -f -d;"
; subrepull = !git submodule foreach "git repull"
; repull = !git checkout master && git pull
ver = !git branch 2> /null | sed -e \"/^[^*]/d\" -e \"s/* \\(.*\\)/\\1/\" > version && git log --pretty=oneline --date-order | wc -l | sed \"s/^ *//g\" | sed \"s/ *$//g\"' >> version && git log -1 --pretty=format:\"%cn%n%ci%n%h\" >> version
[tig]
show-rev-graph = yes # Show revision graph?
show-refs = yes # Show references?
# show-line-numbers = no # Show line numbers?
author-width = 15 # Set width of the author column
line-graphics = yes # Disable graphics characters
line-number-interval = 5 # Interval between line numbers
tab-size = 4 # Number of spaces per tab
[format]
pretty = format:%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment