-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
92 lines (91 loc) · 3.07 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
[core]
excludesfile = ~/.gitignore_global
attributesfile = ~/.gitattributes_global
editor = vim
precomposeunicode = false
[init]
defaultBranch = main
[color]
ui = true
[color "diff"]
meta = cyan bold
frag = cyan bold
func = cyan bold
old = white red
new = green reverse
; commit =
whitespace = red reverse dim
oldMoved = red yellow
newMoved = black yellow
; -- See --color-moved in git-diff(1) --
; oldMovedDimmed =
; oldMovedAlternative =
; oldMovedAlternativeDimmed
; newMovedDimmed
; newMovedAlternative
; newMovedAlternativeDimmed
; -- See git-range-diff(1) --
; contextDimmed
; oldDimmed
; newDimmed
; contextBold
; oldBold
; newBold
[diff]
; -- vim+fugitive is preferred over vimdiff. See 'fix' alias --
tool = fugitive
wsErrorHighlight = all
colorMoved = zebra
[difftool "fugitive"]
cmd = vim -f -c \"Gdiffsplit!\" \"$MERGED\"
layout = LOCAL,MERGED,REMOTE
[merge]
tool = fugitive
conflictstyle = diff3
[mergetool "fugitive"]
cmd = nvim -f -c \"Gvdiffsplit!\" \"$MERGED\"
[alias]
bl = blame
br = branch
biff = "!f() { base=${1-main}; rev=${2-HEAD}; git diff $(git merge-base $base $rev) $rev; }; f"
blg = "!f() { base=${1-main}; rev=${2-HEAD}; git log --pretty=format:'%Cred%h%Creset %s %C(bold blue)<%an>%Creset' --numstat $(git merge-base $base $rev)..$rev; }; f"
bog = "!f() { base=${1-main}; rev=${2-HEAD}; git log $(git merge-base $base $rev)..$rev; }; f"
byline = "!f() { pat=${1}; git log --graph --all --decorate --branches --author=$pat; }; f"
changes = diff --stat
ci = commit
co = checkout
d = !git --no-pager diff
diffstat = !git --no-pager diff --stat -r
dt = difftool -y
fix = "!f() { ${EDITOR} $(git diff --name-only); }; f"
hidden = ! git ls-files -v | grep '^h' | cut -c3-
hide = update-index --assume-unchanged
unhide = update-index --no-assume-unchanged
last = !git --no-pager log -1 HEAD
lc = log ORIG_HEAD.. --stat --no-merges
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
new = checkout -b
old = branch -l --format '* %(color:blue)%(authordate:short) %(color:magenta reverse)%(align:16,left) %(authordate:relative) %(end)%(color:reset normal) %(refname:short)' --sort='-authordate'
pub = publish
publish = "!f() { branch=${2-$(git rev-parse --abbrev-ref HEAD)}; remote=${1-$(git remote | head -n 1)}; git push -u $remote $branch; }; f"
puff = pull --ff-only
s = status --short -b
sha = rev-parse --short --default HEAD
stl = !git stash show -n${1-10}
sts = !git stash show -p
who = !git --no-pager shortlog -sne
words = diff --color-words
w = !git --no-pager diff --color-words
[blame]
date = short
[push]
default = simple
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
[include]
path = ~/.gitconfig.user
[hub]
protocol = https