Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
~/.config/git/config
[user]
name = Brad Wilson
email = dotnetguy@gmail.com
signingkey = 0B7BD15AD1EC5FDE
[alias]
a = add -A
abort = rebase --abort
amend = commit --amend -C HEAD
bclean = "!f() { git checkout ${1-master} && git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs git branch -d; }; f"
bdone = "!f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f"
blame = blame -w -M -C
br = branch
cat = cat-file -t
ci = commit -a
co = checkout
compact = "!git gc --aggressive && git gc --prune=now"
cp = cherry-pick
d = diff -w --patience
dc = diff -w --patience --cached
df = diff --word-diff=color --word-diff-regex=. -w --patience
diff = diff --compaction-heuristic
dt = difftool
dump = cat-file -p
go = rebase --continue
hs = !git h --max-count=10
l = !git log --graph --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
migrate = "!f() { CURRENT=$(git symbolic-ref --short HEAD); git checkout -b $1 && git branch --force $CURRENT ${3-'$CURRENT@{u}'} && git rebase --onto ${2-master} $CURRENT; }; f"
mt = mergetool
pick = add -p
pr = !"pr() { git fetch origin pull/$1/head:pr-$1; git checkout pr-$1; }; pr"
pushf = push --force-with-lease
pushu = !"git push --set-upstream ${1-origin} $(git branch --show-current)"
r = add --refresh
re = rebase
scorch = clean -xdf -e packages -e .nuget -e nuget.exe -e *.dbmdl -e *.suo -e *.user -e .vs -e .vagrant -e .dotnet -e .idea -e .vscode -e node_modules
skip = rebase --skip
st = status -sb
stats = diff --stat
tag = tag -s
undo = reset HEAD~
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
[color "branch"]
current = red bold
local = normal
remote = yellow bold
plain = normal
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
header = normal
added = red bold
updated = green bold
changed = cyan bold
untracked = cyan bold
nobranch = red bold
[commit]
gpgSign = true
[core]
longpaths = true
[diff]
tool = bc
[diff "astextplain"]
textconv = astextplain
[difftool]
prompt = false
[difftool "bc"]
trustExitCode = true
cmd = bcompare \"$LOCAL\" \"$REMOTE\"
[difftool "p4merge"]
cmd = launchp4merge \"$LOCAL\" \"$REMOTE\"
keepBackup = false
trustExitCode = false
[fetch]
prune = true
[merge]
tool = bc
[mergetool]
prompt = false
keepBackup = false
[mergetool "bc"]
trustExitCode = true
cmd = bcompare \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
[mergetool "p4merge"]
cmd = launchp4merge \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
keepTemporaries = false
trustExitCode = false
keepBackup = false
[pack]
packSizeLimit = 2g
useSparse = true
[push]
default = upstream
[pull]
rebase = true
[rebase]
autosquash = true
[tag]
forceSignAnnotated = true
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
[filter "encrypt"]
smudge = gitcrypt smudge
clean = gitcrypt clean
[diff "encrypt"]
textconv = gitcrypt diff
[gui]
tabsize = 4
[credential]
helper = store
modalPrompt = false
[log]
follow = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.