-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig
95 lines (78 loc) · 2.5 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
[alias]
dc = diff --cached
co = checkout
st = status
ci = commit
aci = !ci --history 5
br = branch
s = switch
cp = cherry-pick
sdiff = difftool -y -t vsdiffmerge
sync = pull --all --prune
undo = "!f() { git reset --hard @{${1-1}}; }; f"
addnew = !git add $(git ls-files -o --exclude-standard)
new = ls-files -o --exclude-standard
ld = log -p
wt = worktree
get = co origin/master --
bdiff = !git-branch-diff main
# recent = "!f() { git s $(git br --sort=committerdate | grep -v '*' | fzf; ); }; f"
recent = branch --sort=committerdate
untracked = ls-files --others --exclude-standard
fp = push --force-with-lease
# Log
# pretty-format; https://git-scm.com/docs/pretty-formats
# The basic colors: black, red, green, yellow, blue, magenta, cyan, white and default.
# + after % inserts a line-feed before the expansion
# - after % deletes all preceeding line-feed before the expansion
l = log --oneline --graph --decorate --all
ll = log --graph --topo-order --abbrev-commit --date=short --decorate --all --boundary --pretty=format:'%Cgreen%ad %Cred%h%Creset -%C(yellow)%d%Creset %s %Cblue[%cn]%Creset'
lll = log --graph --topo-order --abbrev-commit --date=short --decorate --all --boundary --pretty=format:'%Cgreen%ad %Cred%h%Creset -%C(yellow)%d%Creset %s %Cblue[%cn]%Creset %+b'
lg = log --color --graph --decorate --all --abbrev-commit --date=relative
# Stash
sl = stash list
sll = stash-list
slll = stash-list --full
ss = stash save
sa = "!sh -c 'git stash apply stash@{$1}' -"
sd = "!sh -c 'git stash drop stash@{$1}' -"
[add.interactive]
useBuiltin = false
[merge]
tool = vimdiff
conflictstyle = diff3
[diff]
tool = vimdiff
[mergetool]
prompt = false
[mergetool "vimdiff"]
cmd = lvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[difftool]
prompt = false
[core]
editor = $EDITOR
pager = diff-so-fancy | less --tabs=4 -RFX
whitespace = blank-at-eol,blank-at-eof
[apply]
whitespace = fix
[pull]
rebase = true
[branch "master"]
mergeoptions = --no-ff
[user]
name = Caspar Nettelbladt
email = [email protected]
[includeIf "gitdir:~/repos/tibber/"]
path = ~/.config/git/tibber
[interactive]
diffFilter = diff-so-fancy --patch
[delta]
navigate = true # use n and N to move between diff sections
[credential "https://github.com"]
helper =
helper = !/home/tibber/.local/bin/gh auth git-credential
[credential "https://gist.github.com"]
helper =
helper = !/home/tibber/.local/bin/gh auth git-credential
[rerere]
enabled = true