-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
53 lines (53 loc) · 2.47 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
[user]
[color]
ui = true
[format]
pretty = oneline
[alias]
ls = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
atk = log --graph --pretty=format:'%s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
commitsAtDate = "!f() { git log --pretty='format: - %s' --decorate --after=\"$1 0:00\" --before=\"$1 23:59\" --author \"`git config user.name`\"; }; f"
ll = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --decorate --numstat
lf = log --follow --summary --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --
lfdet = log --follow --summary -p --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --
create-tar-branch = "!f() { git archive --output=$1 $2; }; f"
create-diff-father-son-tar = "!f() { git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT $1^ $2 | xargs tar -rf $3; }; f"
showdiff-father-son = "!f() { git diff-tree -r --name-only $1^ $2; }; f"
pr = "!f() { git fetch -fu ${2:-upstream} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f"
pr-clean = "!git checkout master ; git for-each-ref refs/heads/pr/* --format=\"%(refname)\" | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done"
[core]
editor = nvim -f
autocrlf = false
safecrlf = true
pager = "{ \
COLUMNS=$(tput cols); \
if [ $COLUMNS -ge 80 ] && [ -z $FZF_PREVIEW_COLUMNS ]; then \
delta --side-by-side -w $COLUMNS; \
elif [ $COLUMNS -ge 160 ] && [ ! -z $FZF_PREVIEW_COLUMNS ]; then \
delta --side-by-side -w $FZF_PREVIEW_COLUMNS; \
else \
delta; \
fi \
}"
[github]
[merge]
tool = vimdiff
conflictstyle = diff3
[mergetool]
prompt = false
[commit]
gpgsign = true
[interactive]
diffFilter = delta --color-only
[delta]
features = line-numbers decorations
whitespace-error-style = 22 reverse
syntax-theme = gruvbox-dark
[delta "decorations"]
commit-decoration-style = bold yellow box ul
file-style = bold yellow ul
file-decoration-style = none
[pull]
rebase = false
[init]
defaultBranch = main