summaryrefslogtreecommitdiff
path: root/modules/40-git/gitconfig
blob: 82f6de69d96e46f0fe5826160b61412947cba934 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
[user]
	name = Galen Guyer
	email = galen@galenguyer.com
	signingkey = 7E54503B0CC743654BEB7187185693577B356767
[gpg]
	program = gpg
[commit]
	gpgsign = true
[tag]
	gpgsign = true
[pull]
	rebase = true
[alias]
	lg = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
	edit-alias = "!f() {\n\t_tmpfile=\"$(mktemp --tmpdir git-alias-$@.XXXXX.sh)\"\n\tgit config --global --get alias.\"$@\" > \"$_tmpfile\"\n\t_startsum=$(md5sum \"$_tmpfile\" | cut -d' ' -f1)\n\t$EDITOR \"$_tmpfile\"\n\t_finalsum=$(md5sum \"$_tmpfile\" | cut -d' ' -f1)\n\tif [[ \"$_startsum\" != \"$_finalsum\" ]]; then\n\t\tgit config --global alias.\"$@\" \"$(cat $_tmpfile)\"\n\telse\n\t\techo \"Alias not modified\" >&2\n\tfi\n\trm \"$_tmpfile\"\n}; f"
	fdiff = "!f() {\n\tif command -v fzf 2>&1 >/dev/null; then\n\t\tPREVIEW=\"{ if [[ \\\"{+}\\\" == *\\\"{}\\\"* ]]; then\n\t\t\t\tgit diff --color=always $@ -- {+};\n\t\t\telse\n\t\t\t\tgit diff --color=always $@ -- {};\n\t\t\tfi } | /usr/share/git/diff-highlight/diff-highlight\"\n\t\tgit diff \"$@\" --name-only | \\\n\t\t\tfzf \\\n\t\t\t\t--scheme=path \\\n\t\t\t\t--layout=reverse \\\n\t\t\t\t--info=inline \\\n\t\t\t\t--multi \\\n\t\t\t\t--cycle \\\n\t\t\t\t--header=\"git diff $@\" \\\n\t\t\t\t--header-first \\\n\t\t\t\t--filepath-word \\\n\t\t\t\t--ansi \\\n\t\t\t\t--preview-window=\"60%,wrap\" \\\n\t\t\t\t--preview \"$PREVIEW\" \\\n\t\t\t\t--bind=\"enter:execute(git diff {})\"\n\telse\n\t\techo \"fzf not found, using normal diff\" >&2\n\t\tgit diff \"$@\"\n\tfi\n}; f"
	gce = config --global --edit
	ce = config --edit
	clean-untracked = clean --force -d
	cdiff = "!f() {\n        if command -v fzf 2>&1 >/dev/null; then\n\t\tPREVIEW='if echo \"{+1}\" | grep \" \" >/dev/null && [[ \"{+1}\" == *\"{1}\"* ]]; then export REV2=`echo {+1} | grep -Po \"^[A-z0-9]*\"`; export REV1=`echo {+1} | grep -Po \"[A-z0-9]*$\"`; else export REV2={1}; export REV1={1}^; fi; git diff --color=always $REV1..$REV2 | /usr/share/git/diff-highlight/diff-highlight'\n\t\tgit log --oneline --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)\\n' | \\\n                        fzf \\\n                                --scheme=path \\\n                                --layout=reverse \\\n                                --info=inline \\\n                                --multi \\\n                                --cycle \\\n                                --header-first \\\n                                --filepath-word \\\n                                --ansi \\\n                                --preview-window=\"60%,wrap\" \\\n                                --preview \"$PREVIEW\"\n        else\n                echo \"fzf not found, sad\" >&2\n        fi\n}; f"
[push]
	autoSetupRemote = true
[blame]
	#ignoreRevsFile = .git-blame-ignore-revs
[pager]
	diff = /usr/share/git/diff-highlight/diff-highlight | less
	log = /usr/share/git/diff-highlight/diff-highlight | less
	tree = /usr/share/git/diff-highlight/diff-highlight | less
[interactive]
	diffFilter = /usr/share/git/diff-highlight/diff-highlight
[lfs]
	url = "https://lfs.galenguyer.com"
[filter "lfs"]
	process = git-lfs filter-process
	required = true
	clean = git-lfs clean -- %f
	smudge = git-lfs smudge -- %f