-
Notifications
You must be signed in to change notification settings - Fork 3
/
gitconfig
123 lines (103 loc) · 2.64 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
[credential]
helper = osxkeychain
[user]
name = Landon Schropp
email = schroppl@gmail.com
[push]
default = current
followTags = true
autoSetupRemote = true
[pull]
ff = only
[alias]
# Shortcuts
a = add
b = branch
bs = branches
c = commit
cl = clone
co = checkout
cp = cherry-pick
fp = force-push
fpu = force-pull
fu = fixup
l = compact-log
m = merge
my-bs = my-branches
p = push --follow-tags
pu = pull
r = reset
ri = !git fetch && git rebase -i
rio = !git fetch && git rebase -i origin/main
s = status
sq = squash
# Command aliases
aliases = "config --get-regexp alias"
compact-log = log \
--graph \
--pretty=format:'%Cred%h %Cgreen(%cs)%Creset%Creset %s %C(bold blue)<%an>%C(yellow)%d%Creset' \
--abbrev-commit
current-branch = "rev-parse --abbrev-ref HEAD"
dad = "!curl https://icanhazdadjoke.com/ && echo"
squash = "fixup --squash"
force-push = "push --force-with-lease"
my-branches = "!git branches | grep -i '$()'"
# Custom script aliases
branches = "!$HOME/.dotfiles/bin/git/git-branches"
default-branch = "!$HOME/.dotfiles/bin/git/git-default-branch"
delete-all-branches = "!$HOME/.dotfiles/bin/git/git-delete-branches"
delete-merged-branches = "!$HOME/.dotfiles/bin/git/git-delete-branches --merged"
force-pull = "!$HOME/.dotfiles/bin/git/git-force-pull"
local-repos = "!$HOME/.dotfiles/bin/git/git-local-repos"
my-branches = "!$HOME/.dotfiles/bin/git/git-my-branches"
review = "!$HOME/.dotfiles/bin/git/git-review"
stash-staged = "!$HOME/.dotfiles/bin/git/git-stash-staged"
what-did-i-do = "!$HOME/.dotfiles/bin/git/git-what-did-i-do"
[core]
excludesfile = "~/.gitignore"
mergeoptions = "--no-edit"
pager = "diff-so-fancy | less --tabs=2 -R"
[interactive]
diffFilter = "diff-so-fancy --patch"
[fetch]
prune = true
[rebase]
autosquash = true
[diff]
colorMoved = zebra
[status]
showUntrackedFiles = all
[color "diff"]
meta = "yellow bold"
commit = "green bold"
frag = "magenta bold"
old = "red bold"
new = "green bold"
whitespace = "red reverse"
[color "diff-highlight"]
oldNormal = "red bold"
oldHighlight = "black bold red"
newNormal = "green bold"
newHighlight = "black bold green"
[merge]
tool = vimdiff
ff = only
[rerere]
enabled = true
[log]
abbrevCommit = true
[init]
defaultBranch = main
[fixup]
menu = fzf \
--bind 'tab:toggle-preview' \
--preview 'git show --color {+1}' \
--preview-window=up:50% \
--info hidden \
--prompt '🔍 Search for a commit: '
commit = true
[filter "lfs"]
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f