-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
179 lines (179 loc) · 4.47 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
169
170
171
172
173
174
175
176
177
178
179
# This is Git's per-user configuration file.
[user]
# Please adapt and uncomment the following lines:
name = Laith
email = [email protected]
[url "ssh://[email protected]/"]
insteadOf = https://github.com/
[color]
ui = auto
[color "branch"]
current = yellow bold
local = green bold
remote = cyan bold
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[color "status"]
added = green bold
changed = yellow bold
untracked = red bold
[diff]
tool = vimdiff
[difftool]
prompt = false
[delta]
features = line-numbers decorations
line-numbers = true
[delta "decorations"]
minus-style = red bold normal
plus-style = green bold normal
minus-emph-style = white bold red
minus-non-emph-style = red bold normal
plus-emph-style = white bold green
plus-non-emph-style = green bold normal
file-style = yellow bold none
file-decoration-style = yellow box
hunk-header-style = magenta bold
hunk-header-decoration-style = magenta box
minus-empty-line-marker-style = normal normal
plus-empty-line-marker-style = normal normal
line-numbers-right-format = "{np:^4}│ "
[core]
editor = vim
autocrlf = input
pager = less -FRSX
excludesfile = /Users/laithrafid/.gitignore_global
[color "status"]
added = green
changed = yellow
untracked = red
[push]
default = current
[init]
defaultBranch = main
[alias]
ad = add --all
adi = add --interactive
adf = add --force
###########################
br = branch
brn = "!git branch $1 && git checkout $1; #"
bra = branch --all
brnr = "!git branch $1 && git push origin -u $1; #"
brd = "!git branch -d $1 && git push origin --delete $1; #"
brD = "!git branch -D $1 && git push origin --delete $1; #"
brrn = "!git branch --move $1 $2 && git push origin :$1 $2 && git push -f origin -u $2; #"
brpl = !/Users/$USER/dotfiles/gitpullallbranches
brmg = branch --merged
brnmg = branch --no-merged
###########################
cl = clone
###########################
ck = checkout
ckb = checkout -b
ckm = checkout main
###########################
cm = commit
cmm = commit -m
cma = commit -a
cmam = commit -a -m
cmd = commit --amend
cmad = commit -a --amend
###########################
lg = log --oneline
lgr = log --oneline --graph --all --pretty=format:'%C(yellow)%h%C(auto)%d%Creset %s %C(white)- %an, %ar%Creset'
lgl = log --graph --pretty=format:'%C(yellow)%h%C(auto)%d%Creset %s %C(white)- %an, %ar%Creset'
lgrv = log --oneline --reverse --all --pretty=format:'%C(yellow)%h%C(auto)%d%Creset %s %C(white)- %an, %ar%Creset'
###########################
ps = push
psf = push -f
psu = push -u
pst = push --tags
pso = push origin
psou = push origin -u
psul = push origin -u --all
psom = push origin -u main
###########################
cp = cherry-pick
cpa = cherry-pick --abort
cpc = cherry-pick --continue
###########################
df = diff
dfd = diff --cashed
dft = difftool
###########################
mg = merge
mgd = "!git merge $1 && git branch -d $1; #"
###########################
fh = fetch
###########################
pl = pull
pb = pull --rebase
###########################
rb = rebase
rba = rebase --abort
rbc = rebase --continue
rbi = rebase --interactive
rbs = rebase --skip
###########################
rt = reset
rth = reset --hard
rtm = reset --mixed
rts = reset --soft
rthh = reset --hard HEAD
rtmh = reset --mixed HEAD
rtsh = reset --soft HEAD
rthom = reset --hard origin/main
###########################
st = status
stb = status -sb
stl = status --long -v
###########################
tg = tag
tgd = tag -d
###########################
re = remote
rea = remote add
rer = remote rm
rev = remote -v
ren = remote rename
rep = remote prune
res = remote show
reao = remote add origin
reau = remote add upstream
rero = remote remove origin
reru = remote remove upstream
reso = remote show origin
resu = remote show upstream
repo = remote prune origin
repu = remote prune upstream
###########################
sh = stash
sha = stash apply
shc = stash clear
shd = stash drop
shl = stash list
shp = stash pop
shs = stash save
shsk = stash save -k
shw = stash show
sht = !git stash list | wc -l 2>/dev/null | grep -oEi '[0-9][0-9]*'
###########################
sw = show
swp = show -p
swr = show -p --no-color
###########################
ch = switch
chc = switch -c
###########################
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[merge]
tool = smerge