-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgitconfig
More file actions
132 lines (129 loc) · 3.44 KB
/
gitconfig
File metadata and controls
132 lines (129 loc) · 3.44 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
; references:
; `man gitglossary`
; `man gitrevisions`
; `man git-config`
; `/<section>.<key>` for descriptions of values
[user]
name = Sam Lidder
email = sam.lidder@gmail.com
; note:
; - values defined in `path` config are only used when git commands are
; invoked _inside git repos_ under the specified `gitdir` path
; - trailing slash in `gitdir` is required
; - see: `LESS='+/Conditional includes' man git-config`
; - symlinks into `gitdir` path will also use `path` config
[includeIf "gitdir:/Volumes/work/"]
path = ~/.gitconfig-work
[includeIf "gitdir:/media/work/"]
path = ~/.gitconfig-work
[color]
ui = true
[color "diff"]
; see 'git help config' /color.diff.<slot> for more options
meta = cyan
frag = magenta bold
[color "status"]
added = green
changed = yellow
untracked = red
[core]
editor = vim
[commit]
; show diff preview during commit message edits (i.e. `commit`, `rebase --continue`)
verbose = true
[diff]
; see: How Different Are Different diff Algorithms in Git?
; https://link.springer.com/article/10.1007/s10664-019-09772-z
; options:
; myers (default)
; minimal (tries to produce minimal diff, extends `myers`)
; patience
; histogram (since 1.7.7, extends `patience`)
algorithm = histogram
[pull]
ff = only ; fast-forward only
; rebase = true ; false=merge (default), true=rebase
[merge]
conflictstyle = diff3
tool = vimdiff
prompt = true
[stash]
showPatch = true
[rerere]
enabled = true
[push]
default = simple
[fetch]
prune = true
[log]
decorate = full
[status]
submoduleSummary = true
[blame]
date = short
[alias]
amm = amend-ng
ap = add -p
apply-patch = am --3way
authors = shortlog --numbered --summary --email
br = branch -vv
ci = commit
cia = commit --amend
ciad = commit --amend --date=now
co = checkout
conflicted = !vim +Conflicted
cond = conflicted
conflicts = grep --name-only --full-name '^<<<<<<< '
cons = conflicts
cp = cherry-pick
cpc = cherry-pick --continue
cpa = cherry-pick --abort
cps = cherry-pick --skip
dfc = diff --cached
dffc = diff --color-words --cached
df = diff
dff = diff --color-words
; only force push if we've seen the refs we're overwriting
; i.e. avoid race-condition of force-pushing over commit(s) we haven't seen
; note: see `man git-push` about how this heuristic can fail (background process
; periodically `git fetch`-ing)
fpush = push --force-with-lease
lf = log -p --stat
lg = log -p --color-words
lgg = log --oneline --graph
loga = log --pretty=fuller
; mnemonic: modified [(num_)occurrences] (regex|string) [all]
; note: `mst[a]` not possible as `-S` restricts output to changes that have
; different number of occurrences of supplied arg
more = log -p --pickaxe-regex -S
morea = log -p --pickaxe-all --pickaxe-regex -S
most = log -p -S
mosta = log -p --pickaxe-all -S
mre = log -p -G
mrea = log -p --pickaxe-all -G
mt = mergetool
patch = format-patch -1
rb = rebase
rbc = rebase --continue
rba = rebase --abort
rbs = rebase --skip
rbt = rebase --committer-date-is-author-date
re = grep --extended-regexp --line-number
rl = reflog
rs = restore
rss = restore --staged
;rp = remote prune
rt = remote
;ru = remote update
sb = show-branch
sm = submodule
st = status
sts = status --short
# windows config example
#[core]
# editor = "'C:\\Program Files (x86)\\vim\\vim74\\gvim.exe'"
#[merge]
# tool = gvimdiff
#[mergetool "gvimdiff"]
# path = "C:\\Program Files (x86)\\vim\\vim74\\gvim.exe"
; vim: set ts=8 sts=0 sw=8 noet ft=gitconfig :