-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
91 lines (79 loc) · 2.01 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
[core]
# Use VS code as editor
editor = code --wait
# Use diff-so-fancy for diffs
pager = diff-so-fancy | less --tabs=4 -RFX
[interactive]
# Use diff-so-fancy for diffs
diffFilter = diff-so-fancy --patch
[init]
defaultBranch = main
[pull]
# Rebase instead of merge on pull
rebase = true
[gc]
# Don't run garbage collector in background
autoDetach = false
[commit]
verbose = true
[alias]
a = forgit add
bd = forgit branch_delete
bl = forgit blame
c = commit
ca = commit --amend --date=now
can = commit --amend --date=now --no-edit
cb = forgit checkout_branch
cf = forgit checkout_file
co = forgit checkout_commit
cp = forgit cherry_pick_from_branch
cpa = cherry-pick --abort
ct = forgit checkout_tag
d = forgit diff
ds = forgit diff --staged
f = fetch --tags --prune
fa = fetch --all --tags --prune
fc = fetch changes
first-child = "!f() { git log --reverse --ancestry-path --pretty=%H $1..${2:-HEAD} | head -1; }; f"
fu = forgit fixup
i = forgit ignore
l = forgit log
lg = forgit log --graph
ll = log --oneline --pretty=format:'%C(yellow)%h%C(reset) %C(white)%s%C(reset)%C(auto)%d%C(reset) %C(dim white) %an, %ar%C(reset)'
# Bypass diff-so-fancy
patch = !git --no-pager diff
p = pull --prune --recurse-submodules
pushf = push --force-with-lease
pusht = !bash -ic 'git push --set-upstream origin $(git branch --show-current)'
rb = forgit rebase
rba = rebase --abort
rbc = rebase --continue
rc = forgit revert_commit
rh = forgit reset_head
rl = forgit reflog
s = status
ss = forgit stash_show
[advice]
skippedCherryPicks = false
[tig "color"]
title-blur = 0 7 bold
title-focus = 0 7 bold
cursor = default 237 bold
[color "diff-highlight"]
oldNormal = red
oldHighlight = "red #553333"
newNormal = green
newHighlight = "green #2b503b"
[color "diff"]
old = red
new = green
meta = yellow
frag = magenta bold
[color "status"]
added = green
updated = green
changed = magenta
untracked = red
[include]
# Allow local customizations in the .gitconfig_local file
path = ~/.gitconfig_local