-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
55 lines (49 loc) · 1.92 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
[include]
path = ~/.gitconfig.local
[commit]
gpgsign = true
[push]
autoSetupRemote = true
[alias]
alias = "!# Prints all aliases.;\n\
git config --list \
| egrep '^alias.+' \
| sed -e 's/^alias\\.//' \
| sed -e 's/^[^=]*=/\\'$'\\033[31m&\\033[(B\\033[m/' \
| column -t -s'=' \
| sed 's/!#* *//; s/;$//' \
| cut -c1-85"
b0 = "!git branch | awk '/^\\*/{print $2}'"
cleanbranch = "!git branch -d $(git branch --merged | grep -v '^\\*\\|\\<master$')"
rebase-onto = "!f() { git rebase --onto main $(git merge-base \"$1\" \"$2\") \"$1\"; }; f"
update = "!f() { git fetch origin $1:$1; }; f"
resolve = "!f() { git restore --source=main yarn.lock; yarn; git add yarn.lock .yarn; git merge --continue; }; f"
main = "!git fetch origin main:main"
gone = ! git fetch -p && git for-each-ref --format '%(refname:short) %(upstream:track)' | awk '$2 == \"[gone]\" {print $1}' | xargs -r git branch -D
rebase-sq = "!f() { \
TARGET_BRANCH="${@: -1}"; \
SOURCE_BRANCH=$(git rev-parse --abbrev-ref HEAD); \
BASE_COMMIT=$(git merge-base "$SOURCE_BRANCH" "$TARGET_BRANCH"); \
git rebase --onto "$TARGET_BRANCH" "$BASE_COMMIT" "$SOURCE_BRANCH"; \
}; f"
[core]
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
minus-style = syntax "#3a273a"
minus-non-emph-style = syntax "#3a273a"
minus-emph-style = syntax "#6b2e43"
minus-empty-line-marker-style = syntax "#3a273a"
line-numbers-minus-style = "#e26a75"
plus-style = syntax "#273849"
plus-non-emph-style = syntax "#273849"
plus-emph-style = syntax "#305f6f"
plus-empty-line-marker-style = syntax "#273849"
line-numbers-plus-style = "#b8db87"
line-numbers-zero-style = "#3b4261"
[merge]
conflictstyle = diff3
[diff]
colorMoved = default