Skip to content

Instantly share code, notes, and snippets.

@dawnerd
Created August 7, 2012 00:41
Show Gist options
  • Save dawnerd/3280045 to your computer and use it in GitHub Desktop.
Save dawnerd/3280045 to your computer and use it in GitHub Desktop.
My local git config
[core]
autocrlf = input
[alias]
d=diff --color
lg=log --graph --oneline --no-merges --pretty=format:'%Cred%h%Creset - %s %Cgreen(%an - %cr)%Creset %C(yellow)%d%Creset' --abbrev-commit
lf=log --name-only --oneline --no-merges --pretty=format:'%Cred%h%Creset - %s %Cgreen(%an - %cr)%Creset %C(yellow)%d%Creset' --abbrev-commit
lb=!git l --branches
cmp = !sh -c 'git log --left-right --oneline --no-merges --pretty=format:\"%m %Cred%h%Creset - %s %Cgreen(%an - %cr)%Creset %C(yellow)%d%Creset\" $0...'
br="!sh -c 'git fetch origin;git checkout --no-track -b feature/${0/#feature\\//} origin/master'"
mb2=merge --squash
mb=merge --no-ff
f2=log --oneline --first-parent --pretty=format:'%Cred%h%Creset - %s %Cgreen(%an - %ci)%Creset %C(yellow)%d%Creset' --abbrev-commit
f=log --oneline --pretty=format:'%Cred%h%Creset - %s %Cgreen(%an - %cr)%Creset %C(yellow)%d%Creset' --abbrev-commit --merges
sf="!sh -c 'git lg --boundary $0~1..$0'"
sfd="!sh -c 'git log -p --boundary $0~1..$0'"
st=status
co = "!sh -c 'git checkout `git branch -r | grep $1 | head -n 1 | sed \"s@origin/@@\"`' -"
[push]
default = current
[filter "space2tab"]
clean = unexpand --tabs=4 --first-only
smudge = unexpand --tabs=4 --first-only
[user]
email = [email protected]
name = Troy Whiteley
[core]
autocrlf = input
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = true
pager = true
[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]
c = checkout
[merge]
tool = opendiff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment