-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
135 lines (104 loc) · 2.65 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
[user]
name = João Sampaio
email = [email protected]
[core]
pager = delta
excludesFile = ~/.gitignore-global
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true
side-by-side = true
line-numbers = true
[init]
defaultBranch = main
[log]
date = local
[status]
showUntrackedFiles = all
[diff]
colorMoved = no
[merge]
conflictStyle = diff3
[rebase]
updateRefs = true
[rerere]
enabled = true
[commit]
verbose = true
gpgSign = true
[tag]
gpgSign = true
[push]
default = simple
autoSetupRemote = true
[color "branch"]
current = green dim bold
remote = red dim
[color "status"]
added = green dim
changed = blue dim
untracked = red dim
[color "diff"]
meta = black bold
frag = black
new = green dim bold
old = red dim bold
whitespace = black red dim bold
[alias]
main-branch = ! git symbolic-ref refs/remotes/origin/HEAD | cut -d'/' -f4
root = rev-parse --show-toplevel
nuke = "! f() { source "$HOME/.gitfunctions"; __git_nuke; }; f"
big-revert = "! f() { source "$HOME/.gitfunctions"; __git_big_revert; }; f"
# st = status
st = status
# sh = show
sh = show
shf = show --name-status
shh = "! f() { HEADN=$1; shift; git show "HEAD~$HEADN" $@; }; f"
# l = log
l = "! f() { git log --color=always --oneline --graph --decorate $@ | awk -f ~/.git-log-prepend-number-awk | less -R; }; f"
# b = branch
b = branch
br = "! f() { git branch -vv --sort=-committerdate --color=always | head -n 20; }; f"
bn = checkout -b # n = new
bd = branch -D # d = delete
# d = diff
d = diff
dst = diff --name-status
dca = diff --cached
# o = checkout
o = checkout
om = ! git checkout $(git main-branch) # m = master or main
of = checkout -f
# a = add
a = add
aa = add -A :/
apa = add --patch
# c = commit (except cp for cherry-pick)
c = commit
ca = commit -a
cm = commit --amend
cn = commit -n
cam = commit -a --amend
can = commit -a -n
cmn = commit --amend -n
camn = commit -a --amend -n
cw = commit -a -n -m "WIP"
# Undo cw.
ucw = reset HEAD~1
# cp = cherry-pick, intruding into c (commit) namespace
cp = cherry-pick
# r = rebase
r = rebase
ri = rebase -i
rim = "! f() { git rebase -i $(git main-branch); }; f"
# p = push (except pu for pull)
p = push
pf = push --force-with-lease
# pu = pull
pu = pull
[include]
path = ~/devel/dotfiles/references/gitconfigs/gpg-keys
[includeIf "gitdir:~/devel/close/"]
path = ~/devel/dotfiles/references/gitconfigs/close