-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
110 lines (110 loc) · 2.5 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
[alias]
hist = log --pretty=format:'%C(yellow)%h%Creset %ad %C(yellow)|%Creset %s%C(bold blue)%d%Creset %C(red)[%an]%Creset' --graph --date=short
# fixup staged changes to commit
fu = "!REV=$(git rev-parse \"$1\") && git commit --fixup $REV && git -c sequence.editor=: rebase -i $REV~ #"
# fixup all changes to commit
fua = "!git aa && git fu \"$1\" #"
# fixup staged changes to HEAD
fuh = fu HEAD
# fixup all changes to HEAD
fuah = fua HEAD
# commit all
ca = "!git aa && git commit"
co = checkout
cob = checkout -b
aa = add --all
ap = add --patch
# add untacked files to index without staging changes
an = aa --intent-to-add
s = status
br = branch
r = restore
rp = restore --patch
sw = switch
swb = switch --create
# copy diff to clipboard
cdiff = !"git --no-pager diff --no-color \"$@\" | pbcopy; #"
# paste and apply diff from clipboard
pdiff = !"pbpaste | git apply --stat -3 --apply"
# project name
project = !"basename $(git rev-parse --show-toplevel)"
# branch name
cb = rev-parse --abbrev-ref HEAD
# safer force push
pushf = push --force-with-lease --force-if-includes
# start git maintenance, but write to local config
ms = !"GIT_CONFIG_GLOBAL=~/.gitconfig.local git maintenance start"
# change local config
lconfig = config --file ~/.gitconfig.local
[core]
editor = vim
pager = delta
excludesfile = ~/.gitignore_global
fsmonitor = true
[include]
path = ~/.gitconfig.local
[rebase]
autosquash = true
autostash = true
updateRefs = true
[rerere]
enabled = true
autoUpdate = true
[branch]
autosetuprebase = always
sort = -committerdate
[tag]
sort = -taggerdate
[column]
ui = auto
[pager]
branch = false
[color]
ui = true
branch = always
diff = always
interactive = always
status = always
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = yellow
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
[merge]
conflictstyle = zdiff3
[status]
submoduleSummary = true
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true
paging = always
line-numbers = true
true-color = always
hyperlinks = true
[diff]
colorMoved = default
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[push]
autoSetupRemote = true
[help]
autocorrect = 20
[fetch]
prune = true
prunetags = true
fsckobjects = true
[transfer]
fsckobjects = true
[receive]
fsckObjects = true