-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
68 lines (68 loc) · 1.62 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
[core]
editor = nvim
pager = delta --diff-so-fancy
excludesfile = ~/.gitignore_global
[user]
name = Guille
email = [email protected]
[alias]
lg = log --color --graph --pretty=format:'%C(auto)%h%Creset -%C(bold red)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --abbrev=8
le = log --oneline --decorate
fl = log -u
dlc = diff --cached HEAD^
la = "!git config -l | grep alias | cut -c 7-"
cp = cherry-pick
st = status -sb
cl = clone
ci = commit
co = checkout
br = branch
diff = diff --word-diff
r = reset
r1 = reset HEAD^
r2 = reset HEAD^^
rh = reset --hard
rh1 = reset HEAD^ --hard
rh2 = reset HEAD^^ --hard
sl = stash list
sa = stash apply
ss = stash save
# https://jordanelver.co.uk/blog/2020/06/04/fixing-commits-with-git-commit-fixup-and-git-rebase-autosquash/
fixup = "!git log -n 50 --pretty=format:'%h %s' --no-merges | fzf | cut -c -7 | xargs -o git commit --fixup"
dft = difftool
[push]
default = current
# followTags = true
[merge]
ff = only
[fetch]
prune = true
[pull]
ff = only
rebase = true
[delta]
features = decorations
[delta "decorations"]
commit-decoration-style = bold yellow box ul
file-style = bold yellow ul
file-decoration-style = none
hunk-header-decoration-style = cyan box ul
line-numbers = true
[interactive]
diffFilter = delta --color-only --diff-so-fancy --features=no-line-numbers
[init]
defaultBranch = main
[rebase]
autoStash = true
[includeIf "gitdir:~/repos/z/"]
path = ~/.gitconfig_work
[rerere]
enabled = true
[diff]
tool = difftastic
[difftool]
prompt = false
[difftool "difftastic"]
cmd = difft "$LOCAL" "$REMOTE"
[pager]
difftool = true