Skip to content

Instantly share code, notes, and snippets.

@falsefalse
Created November 11, 2016 16:52
Show Gist options
  • Save falsefalse/4037c65ab497f57ceaa82b3128582f6d to your computer and use it in GitHub Desktop.
Save falsefalse/4037c65ab497f57ceaa82b3128582f6d to your computer and use it in GitHub Desktop.
# mostly taken from http://cheat.errtheblog.com/s/git
[core]
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
# display tab as 2 spaces instead of 8
# http://www.liferay.com/web/raymond.auge/blog/-/blogs/setting-tabwidths-to-match-the-project-settings-in-git-and-vi
pager = less -x2
excludesfile = /Users/falsefalse/.gitignore_global
[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
whitespace = red reverse
[color "status"]
added = yellow
changed = green
untracked = cyan
[rebase]
instructionFormat = [%<(14,trunc)%an] %s
[alias]
st = status
br = branch
ft = fetch
# https://coderwall.com/p/x8xbnq/git-don-t-blame-people-for-changing-whitespaces-or-moving-code
blame = blame -w -M --date=short
ci = commit
cia = commit --amend
ciac = commit --amend --reuse-message HEAD
co = checkout
df = diff
dff = diff --cached
# safe rebase
rb = rebase --autostash --autosquash
# ignore on commit, per https://news.ycombinator.com/item?id=3031617
ignore = !git update-index --assume-unchanged
unignore = !git update-index --no-assume-unchanged
ignored = !git ls-files -v | grep "^[[:lower:]]" | awk '{print $2}'
ignore-all = !git st -s | awk '{print $2}' | xargs git ignore
unignore-all = !git ignored | xargs git unignore
log = log --follow
ldf = log -p
gl = log --graph
lol = log --graph --decorate --pretty=oneline --abbrev-commit
# fucking typos
tags = tag
[diff]
algorithm = patience
[push]
default = current
[fetch]
prune = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment