-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitconfig
104 lines (84 loc) · 1.99 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
[core]
excludesfile = /Users/yuriteixeira/.gitignore_global
autocrlf = input
[pager]
diff = delta
log = delta
reflog = delta
show = delta
branch = false
[delta]
plus-style = "syntax #012800"
minus-style = "syntax #340001"
syntax-theme = base16-256
navigate = true
[interactive]
diffFilter = delta --color-only
[push]
default = current
[pull]
default = current
rebase = true
[rebase]
autosquash = true
[diff]
tool = nvim-diff
[merge]
tool = diffconflicts
#conflictstyle = diff3
[mergetool "nvim-diff"]
cmd = nvim -d $BASE $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[mergetool "diffconflicts"]
cmd = nvim -c DiffConflictsWithHistory \"$MERGED\" \"$BASE\" \"$LOCAL\" \"$REMOTE\"
trustExitCode = true
[mergetool]
keepBackup = false
[color "diff"]
meta = yellow bold
[alias]
### FLOW
# clean
cl = checkout -- . && git reset --hard && git clean -idfx
# get
u = pull --rebase
f = fetch
fa = fetch --all
fo = fetch origin
# change
b = branch --sort=-committerdate
co = checkout
com = checkout master
a = add
ap = add -p
st = stash
c = commit -v # with diff
ca = commit -v --amend --no-edit
can = commit -v --amend --no-edit -n
cae = commit -v --amend
ch = cherry-pick
chc = cherry-pick --continue
cha = cherry-pick --abort
re = reset
rep = reset HEAD~
reom = reset origin/master
rehom = reset --hard origin/master
mt = mergetool
# check
s = status --ignore-submodules
h = log --follow -p -M --stat # history of a file
l = log --pretty='%C(red)%h %C(reset)%s %C(bold blue)%an, %C(green)%cr%C(yellow)%d %C(reset)' # usually my favorite format
lo = log # default format (comes with more info)
rl = reflog
d = diff
dc = diff --cached
# organise
r = rebase
rc = rebase --continue
ra = rebase --abort
rom = rebase origin/master
ri = rebase -i
riom = rebase -i origin/master
rih = rebase HEAD
# send
p = push -u
pf = push --force-with-lease # checks for same parent commit on origin before