-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathgitconfig
More file actions
160 lines (156 loc) · 5.11 KB
/
Copy pathgitconfig
File metadata and controls
160 lines (156 loc) · 5.11 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
[user]
useConfigOnly = true
name = Reorx
email = novoreorx@gmail.com
[core]
editor = vim
excludesfile = ~/.gitignore_global
# remove this line or use `less` if delta is not installed
pager = delta
#pager = less -F -X
quotepath = off
[merge]
# Include summaries of merged commits in newly created merge commit messages
log = true
tool = nvimdiff
#conflictstyle = diff3
[push]
default = current
followTags = true
autoSetupRemote = true
[rebase]
autoSquash = true
autoStash = true
updateRefs = true
[color]
ui = true
[color "status"]
added = yellow
changed = green
untracked = cyan
[delta]
navigate = true
features = decorations
[delta "decorations"]
commit-decoration-style = 232 130 box
commit-style = 232 bold italic 130
dark = true
file-added-label = [+]
file-copied-label = [C]
file-decoration-style = yellow ul
file-modified-label = [M]
file-removed-label = [-]
file-renamed-label = [R]
file-style = yellow
hunk-header-decoration-style = box blue
hunk-header-file-style = bold reverse purple
hunk-header-line-number-style = bold blue
hunk-header-style = line-number
# the following is from --diff-so-fancy emulation
minus-style = bold red
minus-non-emph-style = bold red
minus-emph-style = bold red 52
minus-empty-line-marker-style = normal "#3f0001"
zero-style = normal
plus-style = bold green
plus-non-emph-style = bold green
plus-emph-style = bold green 22
plus-empty-line-marker-style = normal "#002800"
[interactive]
diffFilter = delta --color-only --features=interactive
[url "git@github.com:"]
insteadOf = "gh:"
[filter "media"]
required = true
clean = git media clean %f
smudge = git media smudge %f
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
#[http]
# proxy = http://127.0.0.1:1235
[alias]
st = status -sb
ci = commit
cm = commit -m
cma = commit --amend
#lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --abbrev-commit
co = checkout
fixup = "!git log -n 50 --pretty=format:'%h %s' --no-merges | fzf | cut -c -7 | xargs -o git commit --fixup"
# NOTE Dangerous, use with caution
undopush = push -f origin HEAD^:master
undocommit = reset --soft HEAD^
search = "!f() { git log -p -G$1 --all; }; f"
searchcommit = "!f() { git log -G$1 --all; }; f"
searchmessage = "!f() { git log --grep=$1; }; f"
filehistory = "!f() { git log --follow -p -- $1; }; f"
branchgraph = log --all --graph --decorate --oneline --simplify-by-decoration
ls-merged = ! git branch --merged | grep -Ev '[*\\s]* (master|develop)$'
rm-merged = ! git branch --merged | grep -Ev '[*\\s]* (master|develop)$' | xargs -n 1 git branch -d
ls-merged-remote = ! git branch --remote --merged | grep origin | grep -Ev '>|master|develop' | xargs -L1 | cut -d'/' -f2-
rm-merged-remote = ! git branch --remote --merged | grep origin | grep -Ev '>|master|develop' | xargs -L1 | cut -d'/' -f2- | xargs -L 1 git push origin --delete
prune-origin = remote prune origin
lscrap = ls-files --other --exclude-standard --directory
stash-all = stash save --include-untracked
branchupdates = for-each-ref --sort=-committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
# try different log styles
lg = log \
--all \
--graph \
--abbrev-commit \
--date=iso \
--topo-order \
--decorate \
--format=format:'%C(magenta)%h%C(reset) -%C(yellow)%d%C(reset) %s %C(dim magenta)(%ar)%C(reset) %C(dim white)- %an%C(reset)'
l = log \
--graph \
--abbrev-commit \
--date=iso \
--topo-order \
--decorate \
--format=format:'%C(magenta)%h%C(reset) - %C(dim magenta)%ad%C(reset) %C(yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim magenta)%ar%C(reset) %C(dim white)- %an <%ae>%C(reset)'
lol = log --graph --decorate --abbrev-commit
tags = tag -n --sort=v:refname -l
tags-v = tag -n99 --sort=v:refname -l
[init]
defaultBranch = master
[pull]
ff = only
[includeIf "gitdir:~/Code/smu/"]
path = ~/Code/smu/.gitconfig
[column]
# make `git branch` show as columns
ui = auto
[branch]
sort = -committerdate
[tag]
# sort semver tags correctly
sort = version:refname
[diff]
# would be clearer than myers for code block movement
algorithm = histogram
# make diff recognize block movement and show in different color other than red/green
colorMoved = plain
# replace the a/ and b/ in your diff header output with where the diff is coming from, so i/ (index), w/ (working directory) or c/ commit.
mnemonicPrefix = true
# detect if a file has been renamed
renames = true
[fetch]
# auto delete obsolete remote branches
prune = true
# auto delete obsolete tags, NOTE this may cause local tag disappear
#pruneTags = true
# fetch all remote at once
all = true
[help]
autocorrect = prompt
[commit]
# show diffs in commit editor
verbose = true
[rerere]
# memorizes the conflict and the resolution to it
enabled = true
# automatically re-solve the memorized resolution that it's seen before
autoupdate = true