This repository has been archived by the owner on Nov 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
68 lines (60 loc) · 1.5 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
[core]
pager = delta
[user]
email = [email protected]
name = Mohammed Saud
[color] # colorize output
diff = auto
status = auto
branch = auto
interactive = auto
ui = true
pager = true
[diff]
colorMoved = default
[credential] # cache credentials
helper = cache --timeout=3600
[interactive]
diffFilter = delta --color-only
[delta]
side-by-side = true
line-numbers = true
navigate = true
[merge]
conflictstyle = diff3
[sendemail]
smtpEncryption = tls
smtpServer = smtp.gmail.com
smtpServerPort = 587
smtpUser = [email protected]
[pull]
rebase = true
[alias]
st = status
co = checkout
br = branch
last = log -1 HEAD
yoink = reset --hard
# All unmerged commits after fetch
lc = log ORIG_HEAD.. --stat --no-merges
# log in local time
llog = log --date=local
# Fetch PR from upstream
pr = "!f() { git fetch upstream pull/${1}/head:pr${1}; }; f"
# Pretty log
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
# Show current branch
pwd = symbolic-ref --short HEAD
# Show corresponding upstream branch
upstream = name-rev @{upstream}
# Set upstream before pushing if necessary
pu = "!f() { if [ \"$(git upstream 2> /dev/null)\" ]; then git push; else git push -u origin $(git pwd); fi }; f"
# Pull submodules
pulsub = submodule update --remote
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[init]
defaultBranch = main