-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
75 lines (56 loc) · 1.76 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
[alias]
# View abbreviated SHA, description, and history graph of the latest 20 commits
l = !"git --no-pager log --pretty=format:\"%C(yellow)%h %C(cyan)%ad %Cblue%aN%C(auto)%d %Creset%s\" -n 10 --graph --date=relative"
# View the current working tree status using the short format
s = status -s
# Show the diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD -- || clear; git diff --patch-with-stat"
# Fetch and then rebase with origin/main
frm = !"git fetch --all --prune --jobs=10 && git rebase origin/main"
# Fixup changes
fixup = "!f() { TARGET=$(git rev-parse "$1"); git commit --fixup=$TARGET ${@:2} && EDITOR=true git rebase -i --autostash --autosquash $TARGET^; }; f"
# Commit all changes
ca = !git add -A && git commit -av
# Show verbose output about tags, branches or remotes
branches = branch -a
remotes = remote -v
tags = tag -l
[user]
name = Yan Yi Goh
[core]
excludesfile = ~/.gitignore
pager = delta
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[commit]
template = ~/.stCommitMsg
[color]
# Use colors in Git commands that are capable of colored output when
# outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.)
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold # line info
old = red # deletions
new = green # additions
[color "status"]
added = yellow
changed = green
untracked = cyan
[url "[email protected]:"]
insteadOf = https://gitlab.com/
[url "[email protected]:"]
insteadOf = https://github.com/
[init]
defaultBranch = main
[delta]
plus-style = "syntax #005700"
minus-style = "syntax #420000"
[interactive]
diffFilter = delta --color-only