-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
168 lines (147 loc) · 4.81 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
[apply]
ignoreWhitespace = change
[color]
ui = auto
[color "branch"]
# Blue on black is hard to read in git branch -vv: use cyan instead
upstream = cyan
[commit]
cleanup = default
status = false
[core]
attributesFile = ~/.gitattributes_global
excludesfile = ~/.gitignore_global
autocrlf = input
pager = less -r
editor = vim -c 'let g:nosession=1'
# Don't consider trailing space change as a cause for merge conflicts
whitespace = -trailing-space
filemode = false
precomposeUnicode = true
[diff]
tool = vimdiff
# Use better, descriptive initials (c, i, w) instead of a/b.
mnemonicPrefix = true
# Show renames/moves as such
renames = true
# When using --word-diff, assume --word-diff-regex=.
wordRegex = .
# Display submodule-related information (commit listings)
submodule = log
[diff "gpg"]
textconv = gpg --no-tty --decrypt
[fetch]
recurseSubmodules = on-demand
[grep]
# Consider most regexes to be ERE
extendedRegexp = true
[log]
# Use abbrev SHAs whenever possible/relevant instead of full 40 chars
abbrevCommit = true
# Automatically --follow when given a single path
follow = true
[merge]
tool = vimdiff
# conflictStyle = diff3
conflictStyle = merge
prompt = false
keepBackup = false
[rebase]
autoSquash = true
[mergetool]
# Clean up backup files created by merge tools on tool exit
keepBackup = false
# Clean up temp files created by merge tools on tool exit
# keepTemporaries = false
# Put the temp files in a dedicated dir anyway
# writeToTemp = true
# Auto-accept file prompts when launching merge tools
prompt = false
[pull]
rebase = merges
[push]
default = current
# When pushing, also push tags whose commit-ishs are now reachable upstream
followTags = true
recurseSubmodules = on-demand
[status]
# or 1
submodulesummary = true
# Recursively traverse untracked directories to display all contents
showUntrackedFiles = all
[submodule]
recurse = true
[tag]
# Sort tags as version numbers whenever applicable, so 1.10.2 is AFTER 1.2.0.
sort = version:refname
[versionsort]
prereleaseSuffix = -pre
prereleaseSuffix = .pre
prereleaseSuffix = -beta
prereleaseSuffix = .beta
prereleaseSuffix = -rc
prereleaseSuffix = .rc
[alias]
la = "!git config -l | grep alias | cut -c 7-" # list all aliases
lg = log --graph --date=relative --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ad)%Creset'
ls = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --all --branches
ll = log --pretty=format:'* %Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --decorate --numstat --all --branches
fl = log -p
find = log --all --pretty=\"format:%Cgreen%H %Cblue%s%Creset\" --name-status --grep
rl = reflog --pretty=format:\"%Cred%h%Creset %C(auto)%gd%Creset %C(auto)%gs%C(reset) %C(green)(%cr)%C(reset) %C(bold blue)<%an>%Creset\" --abbrev-commit
# lf = log -u
a = add --all
ap = add --all -p
dl = "!git ll -1" # diff last commit
dr = "!f() { git diff "$1"^.."$1"; }; f " # show diff of the revision
lc = "!f() { git ll "$1"^.."$1"; }; f " # show changed files in revision
diffr = "!f() { git diff "$1"^.."$1"; }; f "
f = "!git ls-files | grep -i " # find file path in code base
gr = grep -Ii # search code base for string
cia = commit --amend --reuse-message=HEAD --edit -v -q
ci = commit -v -q
assume = update-index --assume-unchanged
unassume = update-index --no-assume-unchanged
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
unassumeall = "!git assumed | xargs git update-index --no-assume-unchanged"
assumeall = "!git st -s | awk {'print $2'} | xargs git assume"
lasttag = describe --tags --abbrev=0
lt = describe --tags --abbrev=0
# ours = "!f() { git co --ours $@ && git add $@; }; f" # ????
# theirs = "!f() { git co --theirs $@ && git add $@; }; f" # ????
re = remote
rev = remote -v
rp = replace --format=long
pl = pull
ps = push
pst = push --tags
cp = cherry-pick
st = status -s
fe = fetch
fea = fetch -a
ci = commit
cie = commit --allow-empty
co = checkout
br = branch
brr = branch -r
di = diff
diff = diff
dc = diff --cached HEAD^
r = reset
r1 = reset HEAD^
r2 = reset HEAD^^
ss = stash
sl = stash list --pretty=format:\"%C(red)%h%C(reset) - %C(dim yellow)(%C(bold magenta)%gd%C(dim yellow))%C(reset) %<(70,trunc)%s %C(green)(%cr) %C(bold blue)<%an>%C(reset)\"
sd = stash show -p
mt = mergetool
dt = difftool
sub = submodule
subu = submodule update --recursive --remote --merge
parent = "!git show-branch | grep '*' | grep -v \"$(git rev-parse --abbrev-ref HEAD)\" | head -n1 | sed 's/.*\\[\\(.*\\)\\].*/\\1/' | sed 's/[\\^~].*//' #"
appdy-tag = "!git tag appdy-$(date +%s%3N) "
sh = show
[user]
name = farynaio
email = adam10@puremail.cyou
[gpg]
program = gpg2