-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
92 lines (75 loc) · 2.21 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
#
# Jonathan Cormier's Git Configuration
#
[user]
name = Jonathan Cormier
email = [email protected]
signingkey = 34CD09BD8A253BB518746C3E3C15099390069BAF
# UI and display
[column]
ui = auto
[delta]
navigate = true
line-numbers = true
true-color = always
[color]
ui = auto
[diff]
colorMoved = default
[status]
short = true
# Workflow and operations
[branch]
# Sort branches by commit date (newest first).
sort = -committerdate
[pull]
# Enables rebasing by default when pulling changes.
rebase = true
[merge]
conflictStyle = zdiff3
[commit]
gpgsign = true
[rebase]
autosquash = true
autostash = true
[rerere]
enabled = true
[init]
defaultBranch = main
# Editor and tools
[core]
editor = nvim
pager = delta
[sequence]
editor = interactive-rebase-tool
# Aliases
[alias]
branchcommits = "for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:short)%(color:reset))'"
age = "!git --no-pager log --follow --format="%ad" --date relative -1"
update-repos = "!update-repos.sh"
reftime = "!git --no-pager log -1 --format="%cd" --date=relative"
whereami = "rev-parse HEAD"
squash = "!f() { if [ -z \"$1\" ]; then echo 'Usage: git squash <number-of-commits>'; exit 1; fi; git rebase -i HEAD~$1; }; f"
fixup = "!f() { git commit --fixup HEAD~1; }; f"
staash = "stash --all"
littleblame = "!f() { if [ $# -ne 2 ]; then echo 'Usage: git littleblame <line-range> <file>'; exit 1; fi; git blame -w -C -C -C -C -L $1 $2; }; f"
nuke = "!f() { \
if [ -z \"$1\" ]; then exit; fi; \
read -p \"Permanently remove $1 from ALL branches? (y/N)\" confirm; \
if [[ $confirm == [yY] ]]; then \
echo \"Starting removal process...\"; \
git filter-branch -f --index-filter \"git rm --cached --ignore-unmatched \"$1\"\" --all && \
echo \"File has been removed from all branches.\"; \
else \
echo \"Operation cancelled\"; \
fi; \
}; f"
# File handling
[filter "lfs"]
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
# Misc.
[interactive]
diffFilter = delta --color-only -s