-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
156 lines (138 loc) · 5.01 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
[user]
name = Marek Grzybek
email = feimosi@onet.pl
[core]
autocrlf = input
editor = vim
#pager = delta --plus-color="#012800" --minus-color="#340001" --theme='Monokai Extended'
pager = diff-so-fancy | less --tabs=4 -RF
[interactive]
diffFilter = diff-so-fancy --patch
[pager]
#diff = delta --plus-color="#012800" --minus-color="#340001" --theme='Monokai Extended' | less --tabs=4 -R #--pattern='^(added|deleted|modified): '
diff = diff-so-fancy | less --tabs=4 -RF --pattern='^(added|deleted|modified): '
[push]
default = upstream
[diff]
compactionHeuristic = true
renameLimit = 2000
[color]
branch = auto
diff = auto
status = auto
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red
new = cyan
[color "status"]
added = yellow
changed = green
untracked = cyan
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[alias]
# List all aliases
qwe = config --global --get-regexp alias
# Sorted aliases
aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /' | sort
a = add
aa = add --all
ap = add --patch
au = add --update
b = branch
ba = branch --all
bd = branch --delete
bdf = branch --delete --force
bv = branch --verbose
c = checkout
cb = checkout -b
cm = commit
cmm = commit --message
cmmi = commit --no-verify --message
cma = commit --amend
cmf = commit --no-verify --fixup
cmfv = commit --fixup
cms = commit --squash
fix = commit -a --amend -C HEAD
cp = cherry-pick
d = diff
df = diff --name-status # File diff
ds = diff --staged
dsw = diff --staged --ignore-all-space
dw = diff --word-diff=plain
f = fetch
fp = fetch --prune
l = log --graph --oneline --decorate
la = log --graph --oneline --decorate --all
ll = log --pretty=format:'%Cred%h%Creset -%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
lg = log --stat
lh = log --pretty=format:"%C(green)%h\\ %C(yellow)[%cr]%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
lf = log --full-diff -p --pretty=format:'%Cred%h%Creset -%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
m = merge
mtw = merge --no-ff
mff = merge --ff-only
p = push
pf = push --force-with-lease
pr = "!gitbranchname() { git symbolic-ref --short HEAD; }; gitpushupstream() { git push --set-upstream origin `gitbranchname`; }; gitpushupstream" # Push and setup remote tracking
pu = pull
up = pull --rebase
upas = pull --rebase --autostash
r = rebase
ra = rebase --abort
rc = rebase --continue
rs = rebase --skip
ras = rebase -i --autosquash
rt = reset
s = status --short --branch --
sh = show
sp = stash pop
sa = stash apply
ss = stash save
sl = stash list
t = tag -a
# undo a commit
undo = reset --soft HEAD~1
# clear the working area
abort = reset --hard HEAD
# show what I did today
today = "!sh -c 'git log --reverse --no-merges --oneline --branches=* --date=local --after=\"yesterday 11:59PM\" --author=\"`git config --get user.name`\"'"
# show what I did today with details
today-long = "!sh -c 'git log --reverse --no-merges --branches=* --date=local --after=\"yesterday 11:59PM\" --author=\"`git config --get user.name`\"'"
# show what was done today
today-all = "!sh -c 'git log --reverse --no-merges --oneline --branches=* --date=local --after=\"yesterday 11:59PM\"'"
# show what I did yesterday
yesterday = "!sh -c 'git log --reverse --no-merges --oneline --branches=* --date=local --after=\"yesterday 12:01AM\" --author=\"`git config --get user.name`\"'"
# show what was done yesterday
yesterday-all = "!sh -c 'git log --reverse --no-merges --oneline --branches=* --date=local --after=\"yesterday 12:01AM\"'"
# show the last 10 log messages pretty-printed
ten = "!git --no-pager log --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative -n 10"
# list all the commits of a specific person for the last week
of = log --pretty=format:'%Cred%h%Creset -%Creset %s %Cgreen(%cD) %C(bold blue)<%an>%Creset' --since='1 week ago' --author
# show files affected by a specified commit
touched = diff-tree -r --name-only --no-commit-id
# see the outgoing commits/unpushed commits
outgoing = log master@{u}..
# show number of commits per contributer, sorted
count = shortlog -sn
[rerere]
enabled = true
[init]
templatedir = ~/.git-templates
defaultBranch = master
[credential]
helper = /usr/lib/git-core/git-credential-gnome-keyring
[filter "lfs"]
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f