Skip to content

Instantly share code, notes, and snippets.

@jhsu
Created January 21, 2010 14:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhsu/282852 to your computer and use it in GitHub Desktop.
Save jhsu/282852 to your computer and use it in GitHub Desktop.
[color]
branch = auto
diff = auto
status = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[alias]
st = status
diff = diff -b
ci = commit
br = branch
co = checkout
df = diff
lg = log -p
who = shortlog -s --
lc = log ORIG_HEAD.. --stat --no-merges
llog = log --date=local
recent = diff HEAD..HEAD^ --name-status
konflict = !gitk --left-right HEAD...MERGE_HEAD
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; vim `f`"
add-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`"
k = !gitk
cleanse=clean -d -f
pa = add -p
join = merge --no-ff
up = !sh -c 'git pull --rebase --prune && git log --pretty=format:\"%Cred%ae %Creset- %C(yellow)%s %Creset(%ar)\" HEAD@{1}..'
removed = !sh -c 'git log -1 -p | grep "^- " | wc -l'
added = !sh -c 'git log -1 -p | grep "^+ " | wc -l'
# Git
alias gst='git status'
alias gb='git branch'
alias gba='git branch -a'
alias grm="git status | grep deleted | awk '{print \$3}' | xargs git rm"
alias push?='git cherry -v origin'
alias st='git status'
alias gl='git log --graph --pretty=format:"%Cred%h%Creset . %an: %s %Cgreen(%cr)%Creset" --abbrev-commit --date=relative'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment