[include]
path = ~/.config/git/local

[pull]
rebase = true

[init]
defaultBranch = master

[column]
ui = auto

[branch]
autosetupmerge = true
sort = -committerdate

[tag]
sort = -version:refname

[diff]
algorithm = histogram
colorMoved = plain
mnemonicPrefix = true
renames = true

[push]
default = tracking
autoSetupRemote = true
followTags = true

[fetch]
prune = true
pruneTags = true
all = true

[commit]
verbose = true
#       gpgsign = true

[rerere]
enabled = true
autoupdate = true

[rebase]
autoSquash = true
autoStash = true

[format]
pretty = format:%C(blue)%ad%Creset %C(yellow)%h%C(green)%d%Creset %C(blue)%s %C(magenta) [%an]%Creset

[mergetool]
layout = BASE,MERGED + BASE,LOCAL + BASE,REMOTE

[merge]
conflictStyle = zdiff3
summary = true
verbosity = 1

[apply]
whitespace = nowarn

[core]
excludesfile = ~/.config/git/gitignore
autocrlf = false
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol

[advice]
statusHints = false

[alias]

# add
a = add
padd = add --patch

# branch
b = branch -v
br = branch
branches = branch -a
brs = branch -a

#switch
sw = switch

# commit
c = commit -m
ca = commit -am
ci = commit
cam = commit --amend
cama = commit --amend -a

# clean
cl = clean
cldf = clean -df

# checkout
co = checkout
nb = checkout -b

# cherry-pick
cp = cherry-pick -x			# grab a change from a branch

# diff
d = diff
dc = diff --cached
last = diff HEAD^

# log
l = log --graph --date=short
la = log --graph --date=short --all
lg = log --pretty=format:'%Cred%h%Creset - %C(blue bold)[%ad] %Creset%C(yellow)%d %Creset%s %C(green bold)<%an>%Creset' --abbrev-commit --date=short
llg = log --pretty=format:'%Cred%h%Creset - %C(blue bold)[%ad] %Creset%C(yellow)%d %Creset%s %C(green bold)<%an>%Creset' --abbrev-commit --date=short --graph
lls = git log --pretty=format:"[%h] %ae, %ar: %s" --stat
lc = log ORIG_HEAD.. --stat --no-merges
wu = log -p origin..@{0}
changes = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\" --name-status
short = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\"
changelog = log --pretty=format:\" * %s\"
shortnocolor = log --pretty=format:\"%h %cr %cn %s\"
showfiles = show --name-only

# rebase
rc = rebase --continue
rs = rebase --skip

# remote
r = remote -v

# reset
res = reset
unstage = reset -q HEAD --
discard = checkout --
uncommit = reset --mixed HEAD~
undo = reset --hard

# diff
df = diff --summary
staged = diff --cached
diffstat = diff --stat
changes = diff --name-status -r

# stash
ss = stash
sl = stash list
sa = stash apply
sd = stash drop

# status
s = status
st = status -s

# tag
t = tag -n

# merge
mt = mergetool
dt = difftools

rv = review
ls = ls-files

c = clone --recursive
bc = clone --bare

# worktree
wta = worktree add
wtl = worktree list
wtr = worktree remove

ignore = "!gi() { curl -sL https://www.toptal.com/developers/gitignore/api/$@ ;}; gi"

[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/"

[credential "https://git.nca.uwo.ca"]
	helper = 
	helper = !tea login helper

[credential "http://gitea.sagacity.ca"]
	helper = 
	helper = !tea login helper
