-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
47 lines (42 loc) · 1.41 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
[init]
defaultBranch = main
[user]
name = GabeSchenz
email = [email protected]
[core]
editor = nvim
pager = bat
[push]
autoSetupRemote = true
[fetch]
prune = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[gc]
autoDetach = false
pruneExpire = now
[credential]
helper = cache --timeout 3600
[safe]
directory = *
[alias]
; Repo maintenance
prune-branches = !git remote prune origin && git branch -vv | grep ': gone]' | awk '{print $1}' | xargs -r git branch -d
; reporting
ll = log --pretty=format:\"%C(yellow)%h%Cred%d\\\\ %Creset%s%Cblue\\\\ [%cn\" --decorate --numstat
lg = !git log --pretty=format:\"%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) [%an]\" --graph --abbrev-commit -30
br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate
graph = log --oneline --graph --decorate
recent = !git branch --sort=-committerdate | head
; daily operations
s = status
co = checkout
cob = checkout -b
del = branch -D
save = !git add -A && git commit -m 'chore: commit save point'
undo = reset HEAD~1 --mixed
res = !git reset --hard
fix = "!f() { current_branch=\"$(git branch --show-current)\"; git rebase -i $(git merge-base HEAD dev); git push origin +\"${current_branch}\"; }; f"