Skip to content

Instantly share code, notes, and snippets.

@bryanl
Created March 16, 2012 19:13
Show Gist options
  • Save bryanl/2051932 to your computer and use it in GitHub Desktop.
Save bryanl/2051932 to your computer and use it in GitHub Desktop.
# put this at ~/.gitconfig
[alias]
# I'm lazy, so two letters will always trump the full command
co = checkout
ci = commit
cp = cherry-pick
st = status
br = branch
df = diff
lg = log -p
# Show the log, with the diff +'s and -'s
lc = log ORIG_HEAD.. --stat --no-merges datetag = "tag `date '+%Y%m%d%H%M'`"
# The first thing I run on a new project. Who has done the most damage
who = shortlog -s --
# random stuff cargoculted from who knows where
graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '}'; }; f"
lol = log --pretty=oneline --abbrev-commit --graph --decorate
up = !sh -c 'git pull && git log --pretty=format:"%Cred%ae %Creset - %Cyellow%s %Creset%ar" HEAD@{1}..'
msgforsvn = log --pretty=format:\"%h\t%b\"
svnfind = !sh -c 'git msgforsvn | grep -e \\@$0 | cut -f 1'
alias = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\t=> \\2/' | sort
[user]
name = myuser
email = me@example.com
[color]
diff = auto
status = auto
branch = auto
ui = auto
[core]
excludesfile = /Users/bryan/.gitignore
[github]
user = githubuser
token = 12345
[difftool "Kaleidoscope"]
cmd = ksdiff-wrapper git \"$LOCAL\" \"$REMOTE\"
[mergetool "chdiff"]
cmd = /usr/bin/env chdiff --wait "$LOCAL" "$REMOTE"
keepBackup = false
trustExitCode = false
[push]
default = tracking
[difftool]
prompt = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment