-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
100 lines (78 loc) · 2 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
[core]
editor = vim
pager = diff-so-fancy | less --tabs=4 -RFX
[user]
name = Lucien George
email = [email protected]
[init]
defaultBranch = main
[include]
path = /Users/lucien/.config/dev/gitconfig
[alias]
co = checkout
st = status -sb
br = branch
ci = commit
fo = fetch origin
d = !git --no-pager diff
dt = difftool
stat = !git --no-pager diff --stat
undo = reset --soft HEAD^
unstage = reset HEAD --
revert = reset HEAD^
discard = reset --hard HEAD^
# Clean merged branches
sweep = !git branch --merged main | grep -v 'main$' | xargs git branch -d && git remote prune origin
# http://www.jukie.net/bart/blog/pimping-out-git-log
lg = log --graph --all --pretty=format:'%Cred%h%Creset - %s %Cgreen(%cr) %C(bold blue)%an%Creset %C(yellow)%d%Creset'
# Serve local repo. http://coderwall.com/p/eybtga
# Then other can access via `git clone git://#{YOUR_IP_ADDRESS}/
serve = !git daemon --reuseaddr --verbose --base-path=. --export-all ./.git
m = checkout main
# Removes a file from the index
unstage = reset HEAD --
recent = branch --sort=-committerdate --format=\"%(committerdate:relative)%09%(refname:short)\"
[help]
autocorrect = 20
[push]
default = simple
autoSetupRemote = true
[branch "main"]
mergeoptions = --no-edit
[branch "master"]
mergeoptions = --no-edit
[filter "lfs"]
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
[pull]
rebase = true
[fetch]
prune = true
[diff]
colorMoved = zebra
[interactive]
diffFilter = diff-so-fancy --patch
[color]
branch = auto
diff = auto
interactive = auto
status = auto
ui = auto
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = 11
frag = magenta bold
func = 146 bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
[color "branch"]
current = green
remote = yellow