-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgitconfig
More file actions
133 lines (132 loc) · 3.84 KB
/
gitconfig
File metadata and controls
133 lines (132 loc) · 3.84 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
[user]
name = Matthew Hutchinson
email = matt@hiddenloop.com
signingkey = 89B04DE88C710FA0
[color]
status = auto
diff = auto
branch = auto
interactive = auto
[color "branch"]
current = blue reverse
local = blue
remote = green
[color "diff"]
meta = yellow
frag = magenta
old = red
new = green
[color "status"]
added = yellow
changed = green
untracked = cyan
[alias]
ctags = !.git/hooks/ctags
br = branch
ci = commit
co = checkout
staged = diff --cached
unstaged = diff
logline = log --pretty=oneline
amend = commit --amend --no-edit
plre = pull --rebase
unstage = reset HEAD
uncommit = reset --soft HEAD~1
last = log -p -n1 --pretty=fuller
today = log --since='1 Day Ago'
recent = log --stat --since='3 Hours Ago' --graph --pretty=oneline --abbrev-commit --date=relative
me = log -i --author='matt.*hutchinson'
lol = log --pretty=oneline --abbrev-commit --graph --decorate
delete-merged = !git branch --merged main | egrep -v \"(^\\*|^ main$)\" | xargs git branch --delete
delete-gone = !git fetch --prune && git branch --verbose | awk '/\\[gone]/{print $1}' | xargs git branch --delete --force
upstream = push -u origin HEAD
sdiff = "!git diff \"$@\" | sed -E -e \"s#areas/core/[^/]+/##g\" #"
# see https://tekin.co.uk/2020/06/jump-from-a-git-commit-to-the-pr-in-one-command
merge-commits = "!funct() { git log --merges --reverse --oneline --ancestry-path $1..origin | grep \"Merge pull request\"; }; funct"
pr-number = "!funct() { git merge-commits $1 | head -n1 | sed -n \"s/^.*Merge pull request #\\\\s*\\\\([0-9]*\\\\).*$/\\\\1/p\"; }; funct"
web-url = "!funct() { git config remote.origin.url | sed -e\"s/git@/https:\\/\\//\" -e\"s/\\.git$//\" | sed -E \"s/(\\/\\/[^:]*):/\\1\\//\"; }; funct"
pr = "!funct() { open \"`git web-url`/pull/`git pr-number $1`\" ;}; funct"
[format]
# git log uses --pretty format by default, so this changes the default
# e.g. 4436819 [23 hours ago] (Gabe Berke-Williams) One line prompt
pretty = %C(yellow)%h%Creset %Cgreen[%cr]%Creset (%an) %s
[help]
autocorrect = 1
[core]
legacyheaders = false
excludesfile = ~/.gitignore
editor = vim
attributesfile = ~/.gitattributes
# Treat spaces before tabs and all kinds of trailing whitespace as an error
# [default] trailing-space: looks for spaces at the end of a line
# [default] space-before-tab: looks for spaces before tabs at the beginning of a line
whitespace = space-before-tab,-indent-with-non-tab,trailing-space
[repack]
usedeltabaseoffset = true
[apply]
# Detect whitespace errors when applying a patch
whitespace = fix
[push]
# push current branch even if you've never pushed it before
default = current
[init]
templatedir = ~/.git_template
defaultBranch = main
[url "git://github.com/"]
insteadOf = gh:
[github]
user = matthutchinson
[diff "exif"]
textconv = exiftool
[merge]
tool = opendiff
[mergetool]
keepBackup = false
prompt = false
[grep]
extendedRegexp = true
[rebase]
autosquash = true
[commit]
verbose = true
gpgSign = true
[diff]
noprefix = true
[pull]
rebase = true
[pager]
diff = delta
log = delta
reflog = delta
show = delta
[delta]
side-by-side = false
features = decorations
navigate = true
whitespace-error-style = 22 reverse
[delta "decorations"]
commit-decoration-style = bold yellow box ul
file-style = bold yellow ul
file-decoration-style = none
hunk-header-decoration-style = yellow box
[branch]
sort = -committerdate
[tag]
forceSignAnnotated = true
[fetch]
prune = true
[include]
path = /Users/matt/.config/dev/gitconfig
[includeIf "gitdir/i:~/src/"]
path = ~/.shopify/gitconfig
[includeIf "gitdir/i:~/world/"]
path = ~/.shopify/gitconfig
[filter "media"]
required = true
clean = git-media-clean %f
smudge = git-media-smudge %f
[maintenance]
repo = /Users/matt/world/git
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f