Skip to content

Instantly share code, notes, and snippets.

@mat
Created February 10, 2010 13:51
Show Gist options
  • Save mat/300320 to your computer and use it in GitHub Desktop.
Save mat/300320 to your computer and use it in GitHub Desktop.
.gitconfig & .gitignore - moved to mat/dotfiles
[alias]
# bread and butter
st = status
s = status -sb
d = diff
dc = diff --cached
p = pull --rebase
ir = rebase -i origin/master
amend = commit --amend
l = log --pretty=format:'%Cred%h%Creset %C(bold blue)<%an> -%C(yellow)%d%Creset %s %Cgreen(%cr) %Creset' --abbrev-commit --date=relative
lg = log -p
br = branch
co = checkout
undocommit = reset --soft HEAD^
undomerge-or-pull = reset --hard
# stats
who = shortlog -s -n
slap = blame -w #ignore whitespace
ignored = ls-files -i -o --exclude-standard
# stash
sl = stash list
sp = stash show -p
apply-stash-to-dirty-working-tree = !git stash show -p | git apply && git stash drop
[merge]
log = true
[core]
whitespace=-blank-at-eol # disable leading whitespace highlighting
[rerere]
enabled = 1
[push]
default = nothing # nothing | matching | upstream | current
[color]
branch = auto
diff = auto
status = auto
ui = true
[color "branch"]
current = green reverse
local = green
remote = yellow
[color "diff"]
meta = yellow
old = red bold
new = green bold
[color "status"]
added = green
changed = yellow
untracked = cyan
#
# git config --global core.excludesfile ~/.gitignore
#
.DS_Store
*~
*.swp
*.i
*.i.*
#
# Now living in https://github.com/mat/dotfiles
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment