Skip to content

Instantly share code, notes, and snippets.

@imehr
Forked from jfexyz/.gitconfig
Created September 18, 2011 13:58
Show Gist options
  • Save imehr/1225098 to your computer and use it in GitHub Desktop.
Save imehr/1225098 to your computer and use it in GitHub Desktop.
This file should be renamed ".gitconfig" and placed inside your home directory
##
# This file should be renamed ".gitconfig" and placed inside your home directory.
##
[user]
name = YOUR_NAME
email = YOUR_EMAIL
[github]
user = YOUR_GITHUB_USERNAME
token = YOUR_GITHUB_TOKEN
[alias]
br = branch
ci = commit
cia = commit -a
co = checkout
df = diff
lg = log -p
st = status
sth = stash
up = pull origin
who = shortlog -s --
spull = !git-svn rebase
spush = !git-svn dcommit
ddiff = !git-diff --no-prefix
# `git last 2 user` displays last two days of commits on all local and remote branches for user
# user can be left off to display your own
last = "!fn() { S=1; A=`git config --get user.name`; if [ -n \"$1\" ]; then S=\"$1\"; shift; fi; if [ -n \"$1\" ]; then if [ \"$1\" != \"me\" ]; then A=\"$1\"; fi; shift; fi; git log -i --since=\"$S days ago\" --author=\"$A\" --branches --remotes --format='%C(yellow)%t%Creset %s (%an)' \"$@\"; }; fn"
[color]
ui = auto
branch = auto
diff = auto
status = auto
[push]
default = tracking
[remote "origin"]
push = HEAD
[branch]
autosetupmerge = true
[merge]
tool = diffmerge
[mergetool]
prompt = false
keepBackup = false
[mergetool "chdiff"]
cmd = /usr/bin/env chdiff --wait "$LOCAL" "$REMOTE"
trustExitCode = false
[mergetool "diffmerge"]
cmd = /usr/bin/env diffmerge --merge --result="$MERGED" "$LOCAL" "$BASE" "$REMOTE"
trustExitCode = false
[diff]
tool = diffmerge
[difftool]
prompt = false
[difftool "chdiff"]
cmd = /usr/bin/env chdiff "$LOCAL" "$REMOTE"
[difftool "diffmerge"]
cmd = /usr/bin/env diffmerge "$LOCAL" "$REMOTE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment