[user]
	name = Thomas Dy
	email = thatsmydoing@gmail.com
[merge]
	conflictstyle = zdiff3
[core]
	autocrlf = input
	hooksPath = ~/.config/git/hooks
	untrackedcache = true
[delta]
	features = side-by-side line-numbers decorations
	whitespace-error-style = 22 reverse
[delta "decorations"]
	commit-decoration-style = bold yellow box ul
	file-style = bold yellow ul
	file-decoration-style = none
[color]
	ui = true
[diff]
	algorithm = histogram
[push]
	default = current
[branch]
	# we use a hook to set this up instead
	autoSetupMerge = false
	sort = -committerdate
[remote]
	pushDefault = origin
[alias]
	root = !pwd
	lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit"
	p = push
	pf = push --force-with-lease
	# history fast-forward (to push)
	hff = merge --ff-only @{push}
	# history reset hard (to push)
	hrh = reset --hard @{push}
	# head's history fast-forward (works even if a different branch is checked out)
	hhff = "!git push . $(git head)@{upstream}:$(git head)"
	# head's history reset hard
	hhrh = hhff --force
	# rebase upstream
	ru = rebase @{upstream}
	# rebase interactive upstream
	riu = rebase -i @{upstream}
	# rebase interactive autosquash upstream
	riau = rebase -i --autosquash @{upstream}
	# diff the rebase
	dr = range-diff @{u} @{1} @
	ca = commit --amend
	smash = "!git add -u && git ca --no-edit && git pf"
	reset-head = remote set-head origin -a
	head = for-each-ref --format="%(symref:lstrip=-1)" refs/remotes/origin/HEAD
	sh = "!git switch $(git head)"
	# show/diff but with difftastic
	dshow = -c diff.external=difft show --ext-diff
	ddiff = -c diff.external=difft diff

[include]
	path = ./config.local
