Skip to content

Instantly share code, notes, and snippets.

@mboeh
Created February 6, 2009 20:55
Show Gist options
  • Save mboeh/59607 to your computer and use it in GitHub Desktop.
Save mboeh/59607 to your computer and use it in GitHub Desktop.
[alias]
# Cheap fast way of getting the current branch for, say, your shell prompt
cbranch = !cat .git/HEAD | cut -d/ -f3-4
st = status
# A pattern I find myself using a lot
up = !git fetch && git rebase origin/$(git cbranch)
# The current staged patch
di = diff --cached
# checkout is so long, and co means something sort of different to me
sw = checkout
# Find unmerged files and pass them to vim for fixulating
fix = !vim $(git-ls-files --unmerged | cut -f2 | uniq)
pend = !git log origin/$(git cbranch)..HEAD
[core]
pager = less -FR
excludesfiles = .*.swo .*.swp
whitespace = -trailing-space
[format]
pretty = tformat:"%Cblue%h...%Creset %Cgreen%an:%Creset %s (%ar)"
[color]
ui = 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment