-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig
58 lines (58 loc) · 1.78 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
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
[user]
name = Saurabh Sharan
email = [email protected]
[init]
defaultBranch = main
[alias]
last = log -1 HEAD
ul = push -u origin HEAD
# via https://www.jessesquires.com/blog/2021/10/24/git-aliases-to-improve-productivity/
aliases = "!f() { git config --global -l | grep alias | sort; }; f"
br = branch
dif = diff
st = status
fa = fetch --all
pus = push
pu = push
smartlog = log --graph --pretty=format:'commit: %C(bold red)%h%Creset %C(red)<%H>%Creset %C(bold magenta)%d %Creset%ndate: %C(bold yellow)%cd %Creset%C(yellow)%cr%Creset%nauthor: %C(bold blue)%an%Creset %C(blue)<%ae>%Creset%n%C(cyan)%s%n%Creset'
nuke = reset --hard
ls = log --oneline
# recent = for-each-ref --count=10 --sort=-committerdate refs/heads/ --format="%(refname:short)"
# via https://www.karl.berlin/git-default-branch.html
default-branch = "!git symbolic-ref refs/remotes/origin/HEAD --short | sed 's|origin/||'"
[format]
pretty = %C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)
[log]
date = relative
decorate = short
graph = true
abbrevCommit = true
[branch]
# Sort output of `git branch` by most recently committed (via https://fosstodon.org/@asb/112659544993354147)
sort = -committerdate
[diff]
noprefix = true
[merge]
# See https://ductile.systems/zdiff3/ for why zdiff3 over diff3
conflictStyle = zdiff3
[pull]
ff = only
[push]
autoSetupRemote = true
[core]
excludesfile = /Users/saurabh/.gitignore
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true
light = false
[gpg]
format = ssh
[receive]
fsckObjects = true