Skip to content

Instantly share code, notes, and snippets.

@jrusbatch
Created September 21, 2016 15:55
Show Gist options
  • Save jrusbatch/f1e2fcbe4a165608d2cd225d2101e553 to your computer and use it in GitHub Desktop.
Save jrusbatch/f1e2fcbe4a165608d2cd225d2101e553 to your computer and use it in GitHub Desktop.
Git Config as of 2016-09-21
[alias]
amend = commit -a --amend
bclean = "!f() { git branch --merged ${1-master} | grep -v ${1-master}$ | xargs -n 1 git branch --delete; }; f"
bprune = "!f() { echo $(git branch -r --merged | grep origin | grep -v master | grep -v development | xargs -L1 | cut -d / -f2-) | tr '\n' ' ' | xargs -n 1 git push origin --atomic --delete; }; f"
branches = branch -avv
c = clone --recursive
ca = !git add -A && git commit -av
co = checkout
d = diff --patch-with-stat
fetch-pr = "!f() { git fetch -fu $1 refs/pull/$2/head:pull-$2; }; f"
go = checkout -B
l = log -n 20 --abbrev-commit --pretty=format:'%Cred%h%Creset %C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
nuke = clean -xdf
puff = pull --ff-only
remotes = remote -v
s = status -s
sh = show --abbrev-commit --pretty=format:'%Cred%h%Creset %C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
tags = tag -l
[core]
trustctime = false
editor = code --wait
excludesfile = ~/.gitignore
autocrlf = input
commentChar = :
[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
[merge]
log = true
tool = kdiff3
[url "git@github.com:"]
insteadOf = gh:
pushInsteadOf = github:
pushInsteadOf = git://github.com/
[url "git://github.com/"]
insteadOf = github:
[url "git@gist.github.com:"]
insteadOf = gst:
pushInsteadOf = gist:
pushInsteadOf = git://gist.github.com/
[url "git://gist.github.com/"]
insteadOf = gist:
[push]
default = simple
[diff]
algorithm = patience
tool = kdiff3
guitool = kdiff3
[mergetool]
keepBackup = false
[filter "lfs"]
clean = git lfs clean %f
smudge = git lfs smudge %f
required = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment