-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
81 lines (65 loc) · 2.27 KB
/
.gitconfig
File metadata and controls
81 lines (65 loc) · 2.27 KB
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
[user]
# These values are set in ~/.gitconfig.local
[include]
path = ~/.gitconfig.local
[alias]
ac = commit -a --amend --no-edit
acm = commit -a --amend --verbose --allow-empty
cam = commit -am
com = checkout origin/master
dom = diff origin/master
rom = rebase origin/master
l = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
lb = !git reflog show --pretty=format:'%gs ~ %gd' --date=relative | grep 'checkout:' | grep -oE '[^ ]+ ~ .*' | awk -F~ '!seen[$1]++' | head -n 20 | awk -F' ~ HEAD@{' '{printf(\" \\033[33m%s: \t\\033[37m %s\\033[0m\\n\", substr($2, 1, length($2)-1), $1)}'
lb50 = !git reflog show --pretty=format:'%gs ~ %gd' --date=relative | grep 'checkout:' | grep -oE '[^ ]+ ~ .*' | awk -F~ '!seen[$1]++' | head -n 50 | awk -F' ~ HEAD@{' '{printf(\" \\033[33m%s: \t\\033[37m %s\\033[0m\\n\", substr($2, 1, length($2)-1), $1)}'
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
ll = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
ls = log --stat
st = status
recent = branch -av --sort=-committerdate
fc = "!f() { git branch -a | grep -m1 -e ${1}.*${2} | sed \"s/remotes\\/origin\\///\" | xargs git checkout; }; f"
sco = !sh -c \"git branch -a | grep -v remotes | grep $1 | xargs git checkout\"
[branch]
sort = -committerdate
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "status"]
added = yellow
changed = green
untracked = cyan
[commit]
verbose = true
[core]
commitgraph = true
# This breaks the dotfiles repo
# fsmonitor = true
pager = less -+$LESS -R
untrackedCache = true
whitespace = trailing-space
[diff]
tool = vimdiff
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[init]
defaultBranch = main
[maintenance]
auto = true
strategy = incremental
[push]
default = current
# https://micahkepe.com/blog/gitconfig/#rerere
[rerere]
enabled = true
autoUpdate = true
[status]
showUntrackedFiles = all
branch = true
[tag]
sort = -version:refname