-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgitconfig
107 lines (100 loc) · 2.75 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
# These have been borrowed from YADR:
# https://github.com/skwp/dotfiles/blob/master/git/gitconfig
# set your user tokens as environment variables, such as ~/.secrets
# See the README for examples.
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red
new = green
[alias]
# add
a = add # add
#via http://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit
recent-branches = !git for-each-ref --count=15 --sort=-committerdate refs/heads/ --format='%(refname:short)'
# branch
b = branch -v # branch (verbose)
# commit
c = commit -m # commit with message
ci = commit # commit
# checkout
co = checkout
# log
l = log
# delete merged branches
sync = !git switch main && git pull --prune && git branch --format '%(refname:short) %(upstream:track)' | awk '$2 == \"[gone]\" { print $1 }' | xargs -r git branch -D
[format]
pretty = format:%C(blue)%ad%Creset %C(yellow)%h%C(green)%d%Creset %C(blue)%s %C(magenta) [%an]%Creset
[mergetool]
prompt = false
[merge]
summary = true
verbosity = 1
[apply]
whitespace = nowarn
[branch]
autosetupmerge = true
[push]
# 'git push' will push the current branch to its tracking branch
# the usual default is to push all branches
default = upstream
# automatically push tags to remote
followTags = true
[pull]
# rebase local branch on upstream branch after fetching
rebase = true
[core]
autocrlf = false
excludesfile = ~/.gitignore_global
editor = nvim
[advice]
statusHints = false
[diff]
# Git diff will use (i)ndex, (w)ork tree, (c)ommit and (o)bject
# instead of a/b/c/d as prefixes for patches
mnemonicprefix = true
algorithm = patience
[rerere]
# Remember my merges
# http://gitfu.wordpress.com/2008/04/20/git-rerere-rereremember-what-you-did-last-time/
enabled = true
[include]
path = ~/.gitconfig.user
[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
required = true
process = git-lfs filter-process
[page]
diff = diff-so-fancy | less --tabs=1,5 -RFX
[pager]
diff = diff-so-fancy | less --tabs=2 -RFX
show = diff-so-fancy | less --tabs=2 -RFX
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[credential]
helper = osxkeychain
[commit]
gpgsign = true
[init]
defaultBranch = main
[user]
name = Cole Peters
email = [email protected]