-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
148 lines (148 loc) · 4.97 KB
/
.gitconfig
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
[core]
editor = vim
whitespace = trailing-space,space-before-tab
excludesfile = /Users/tholt/.gitignore
ignorecase = true
autocrlf = input
attributesfile = /Users/twh/.gitattributes
[transfer]
fsckobjects = true
[receive]
fsckobjects = true
[pull]
ff = only
[merge]
ff = only
conflictstyle = diff3
#[diff]
#external = difft
# tool = difftastic
# colorMoved = zebra
[pager]
difftool = true
[color]
ui = auto
[user]
name = Thomas W. Holt Jr.
email = twh@pobox.com
[pack]
useSparse = true
[http]
postBuffer = 157286400
[fetch]
fsckobjects = true
prune = true
parallel = 0
[rebase]
autostash = true
autoSquash = true
[push]
gpgSign = if-asked
followTags = true
autoSetupRemote = true
[commit]
gpgsign = true
template = /Users/tholt/.stCommitMsg
[include]
path = ~/.gitconfig-local
[submodule]
recurse = true
[maintenance]
repo = /Users/twh
[init]
defaultBranch = main
[feature]
manyFiles = true
[advice]
detachedHead = false
[alias]
acp = !git add -A && git commit -m \"auto commit\" && git push
co = checkout
a = "add -p"
b = branch
c = commit -S
cp = cherry-pick
d = diff
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
m = merge
p = push
r = rebase -i origin/main
pwl = push --force-with-lease
st = status --short --branch
ci = commit
br = branch
df = diff
dc = diff --cached
rv = remote -v
who = shortlog -s --
dft = difftool
untrack = rm --cache --
mainbranch = "!git remote show origin | sed -n '/HEAD branch/s/.*: //p'"
synced = "!git pull origin $(git mainbranch) --rebase"
update = "!git pull origin $(git rev-parse --abbrev-ref HEAD) --rebase"
squash = "!git rebase -v -i $(git mainbranch)"
publish = push origin HEAD --force-with-lease
pub = publish
unstage = reset HEAD --
last = log -1 HEAD --stat
logs = log --show-signature
lg = log --graph --oneline --decorate --all
lb = !git reflog show --pretty=format:'%gs ~ %gd' --date=relative | grep 'checkout:' | grep -oE '[^ ]+ ~ .*' | awk -F~ '!seen[$1]++' | head -n 10 | awk -F' ~ HEAD@{' '{printf(\" \\033[33m%s: \\033[37m %s\\033[0m\\n\", substr($2, 1, length($2)-1), $1)}'
source = remote get-url origin
dlog = "!f() { GIT_EXTERNAL_DIFF=difft git log -p --ext-diff $@; }; f"
plog = log @{1}..
slog = log --pretty=slog
pslog = log --pretty=slog @{1}..
dog = log --all --decorate --oneline --graph
ffpull = pull --ff-only
ffmerge = merge --ff-only
gone = ! "git fetch -p && \
git for-each-ref --format '%(refname:short) %(upstream:track)' \
| awk '$2 == \"[gone]\" {print $1}' | xargs git branch -D"
track = "!f() { ([ $# -eq 2 ] && ( echo \"Setting tracking for branch \" $1 \" -> \" $2;git branch --set-upstream $1 $2; ) || ( git for-each-ref --format=\"local: %(refname:short) <--sync--> remote: %(upstream:short)\" refs/heads && echo --Remotes && git remote -v)); }; f"
cake = log --date=format:'%d %b %Y' --diff-filter=A --name-only --pretty='%n%C(yellow bold)🎂️ %ad%Creset by (%C(blue bold)%h%Creset)'
cloner = clone --recursive
uncommit = reset --soft HEAD^
credit = blame
big-files = !"git rev-list --objects --all \
| git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \
| sed -n 's/^blob //p' \
| sort -nk2 \
| cut -c 1-12,41- \
| $(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest"
big-objects = !"git rev-list --all \
| parallel git ls-tree -r --long "{}" \
| sort -uk3 \
| sort -nk4"
whatadded = log --diff-filter=A --follow --find-renames=40% --oneline
birthdate = log --diff-filter=A --follow --find-renames=40% --pretty="format:%as"
[filter "media"]
required = true
clean = git media clean %f
smudge = git media smudge %f
[filter "hawser"]
clean = git hawser clean %f
smudge = git hawser smudge %f
required = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[help]
autocorrect = 20
[difftool]
prompt = false
[difftool "difftastic"]
cmd = difft "$LOCAL" "$REMOTE"
[credential]
helper =
helper = /usr/local/share/gcm-core/git-credential-manager
[credential "https://dev.azure.com"]
useHttpPath = true
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true