-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
127 lines (111 loc) · 3.02 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
[user]
name = Alessio Rocco
email = [email protected]
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE3t2tB7XSUKZGgreUy0sNtALbesrvqoaFduW9JQ7l6r
[core]
excludesfile = ~/.gitignore
autocrlf = input
pager = delta
[include]
path = ~/.config/delta/themes/catppuccin.gitconfig
[interactive]
diffFilter = delta --color-only
[delta]
features = catppuccin-macchiato
navigate = true
[gpg]
format = ssh
[gpg "ssh"]
program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
[commit]
template = ~/.gitmessage
gpgsign = true
[push]
default = current
[pull]
rebase = true
[merge]
conflictstyle = diff3
ff = only
[fetch]
prune = true
[rebase]
autosquash = true
[diff]
colorMoved = default
[format]
pretty = %C(yellow)%h%C(reset) %C(green)%ar%C(reset) %C(bold blue)%an%C(reset) %C(red)%d%C(reset) %s%C(reset)
[alias]
### Git aliases, usually a single character is mapped to the command without
### parameters (E.g. 'a' is the alias for 'add' and 'i' is the alias for
### 'init') but with some exception (E.g. 'co' is the alias for 'checkout').
## init
i = init
# status
s = status
ss = status --short --branch
## add
a = add
aa = add --all
ap = add --patch
## commit
c = commit
ca = commit --amend
cane = commit --amend --no-edit
cm = commit -m
fixup = !fish -c 'fzf_git_log | xargs git commit --fixup'
snapshot = !git add . && git commit -m [snapshot]
## checkout
co = checkout
cob = checkout -b
com = checkout main
## branch
b = branch
mv = branch -m
rename = branch -m
bl = !fish -c 'fzf_git_branch | pbcopy'
ba = !fish -c 'fzf_git_branch --all | pbcopy'
bs = !fish -c 'fzf_git_branch | xargs git checkout'
br = !fish -c 'fzf_git_branch --remote | xargs git checkout --track'
bd = !fish -c 'fzf_git_branch | xargs git branch --delete'
## rebase
r = rebase
rc = rebase --continue
rs = rebase --skip
ra = rebase --abort
ri = !fish -c 'fzf_git_log | xargs -I sha git rebase --interactive sha^'
rim = rebase --interactive main
## stash
h = stash
hh = stash --include-untracked
hl = !fish -c 'fzf_git_stash_list | pbcopy'
hlp = !fish -c 'fzf_git_stash_list | xargs git stash pop'
hla = !fish -c 'fzf_git_stash_list | xargs git stash apply'
hp = stash pop
ha = stash apply
## push
pf = push --set-upstream --force-with-lease
ps = push --set-upstream
## pull
pl = pull
## show
sh = !fish -c 'fzf_git_log | xargs git show --format=medium'
## log
l = log
ll = !fish -c 'fzf_git_log | pbcopy'
la = !fish -c 'fzf_git_log --graph | pbcopy'
glog = !fish -c 'fzf_git_log -R -i --grep '$1' | pbcopy'
slog = !fish -c 'fzf_git_log -G '$1' | pbcopy'
## diff
d = diff --color-words
ds = diff --color-words --cached
## reset
unstage = reset
uncommit = reset --soft HEAD^
unsnapshot = !git uncommit && git unstage
## GitHub
h = !gh
sync = !gh sync
browse = !gh pr view --web
## config
aliases = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\\t => \\2/' | fzf-tmux --ansi