Skip to content

Instantly share code, notes, and snippets.

@peregrinogris
Last active June 15, 2016 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peregrinogris/5448421 to your computer and use it in GitHub Desktop.
Save peregrinogris/5448421 to your computer and use it in GitHub Desktop.
Git Config Files
[alias]
st = status
ci = commit
co = checkout
di = diff -w
dic = diff -w --cached
ll = log --date local --no-merges --format='%C(yellow)%h%Creset %ad %Cgreen%aN%Creset %s'
forgot = commit --amend -C HEAD
branches = branch -av
fbranch = !git ll master..`git rev-parse --abbrev-ref HEAD`
undo = reset --soft 'HEAD^'
sur = submodule update --remote
use = usebranch
cleanup = !git remote prune origin && git branch -D `git branch -avv | grep ': gone' | awk '{print $1}'`
[core]
pager = less
excludesfile = ~/.gitignore
[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
[color "status"]
added = yellow
changed = green
untracked = cyan
[user]
name = "<USERNAME>"
email = <EMAIL>
[diff]
unified = 8
compactionHeuristic = true
[push]
default = simple
[pager]
log = diff-highlight | less
show = diff-highlight | less
diff = diff-highlight | less
[interactive]
diffFilter = diff-highlight
*.pyc
.svn/
*.sublime-project
*.sublime-workspace
.vagrant
.DS_Store
Vagrantfile
#!/bin/sh
# pre commit hook that lints the modified files and prevents commits if they don't pass
lint=`git lint -f`
if test `echo "$lint" | wc -l` = 6; then
exit 0
else
echo "$lint"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment