~kris/dots

srice

ref: 3bdfd3e0c26b75a939850355c30bee6fa9cc9abd srice/.gitconfig -rw-r--r-- 4.6 KiB
3bdfd3e0 — Kris Yotam sync: lock down plan9 theme, wallpapers, nvim configs 3 months ago
                                                                                
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# ~/.gitconfig
# Global Git configuration with multiple identities
# Profile-specific configs are included based on repo location

# ============================================================================
# DEFAULT IDENTITY (fallback)
# ============================================================================
[user]
    name = Kris Yotam
    email = krisyotam@protonmail.com
    signingkey = ~/.ssh/id_ed25519.pub

# ============================================================================
# PROFILE INCLUDES (directory-based identity switching)
# ============================================================================

# Personal projects (krisyotam identity)
[includeIf "gitdir:~/dev/personal/"]
    path = ~/.config/git/profiles/krisyotam

# Pentesting/security projects (khr1st identity)
[includeIf "gitdir:~/dev/security/"]
    path = ~/.config/git/profiles/khr1st

# Work projects (laelyotam identity)
[includeIf "gitdir:~/dev/work/"]
    path = ~/.config/git/profiles/laelyotam

# Dotfiles repo uses personal identity
[includeIf "gitdir:~/dev/krisrice/"]
    path = ~/.config/git/profiles/krisyotam

# ============================================================================
# CORE SETTINGS
# ============================================================================
[core]
    editor = nvim
    pager = delta
    autocrlf = input
    whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol

[init]
    defaultBranch = main

[pull]
    rebase = true

[push]
    default = current
    autoSetupRemote = true

[fetch]
    prune = true

[rebase]
    autoStash = true

# ============================================================================
# DELTA PAGER (Tokyo Night theme)
# ============================================================================
[interactive]
    diffFilter = delta --color-only

[delta]
    navigate = true
    side-by-side = true
    line-numbers = true
    syntax-theme = tokyonight_night
    minus-style = syntax "#3f2d3d"
    minus-non-emph-style = syntax "#3f2d3d"
    minus-emph-style = syntax "#763842"
    minus-empty-line-marker-style = syntax "#3f2d3d"
    line-numbers-minus-style = "#f7768e"
    plus-style = syntax "#283b4d"
    plus-non-emph-style = syntax "#283b4d"
    plus-emph-style = syntax "#316172"
    plus-empty-line-marker-style = syntax "#283b4d"
    line-numbers-plus-style = "#9ece6a"
    line-numbers-zero-style = "#565f89"

# ============================================================================
# DIFF & MERGE
# ============================================================================
[color]
    ui = auto

[merge]
    conflictstyle = diff3
    tool = nvim

[mergetool "nvim"]
    cmd = nvim -d $LOCAL $MERGED $REMOTE

[diff]
    colorMoved = default
    tool = nvim

[difftool "nvim"]
    cmd = nvim -d $LOCAL $REMOTE

# ============================================================================
# COMMIT SIGNING (SSH keys)
# ============================================================================
[commit]
    gpgsign = true

[gpg]
    format = ssh

[gpg "ssh"]
    allowedSignersFile = ~/.config/git/allowed_signers

# ============================================================================
# ALIASES
# ============================================================================
[alias]
    # Status & Info
    st = status -sb
    lg = log --oneline --graph --decorate --all
    ll = log --pretty=format:'%C(yellow)%h%Creset %s %C(cyan)<%an>%Creset %C(green)(%cr)%Creset' --abbrev-commit
    last = log -1 HEAD --stat

    # Branching
    co = checkout
    br = branch -v
    bra = branch -av

    # Committing
    ci = commit
    ca = commit --amend
    can = commit --amend --no-edit

    # Diff
    df = diff
    dfs = diff --staged

    # Stash
    sl = stash list
    sp = stash pop
    ss = stash save

    # Remote
    rv = remote -v

    # Push to all mirrors (uses pushall script or multiple pushurls)
    pa = !git remote | xargs -L1 git push --all
    pushall = !git remote | xargs -L1 git push --all

    # Quick sync
    sync = !git pull --rebase && git push

    # Undo
    unstage = reset HEAD --
    undo = reset --soft HEAD~1

    # Cleanup
    cleanup = !git branch --merged | grep -v '\\*\\|main\\|master' | xargs -n 1 git branch -d

# ============================================================================
# URL SHORTCUTS
# ============================================================================
[url "git@github.com:"]
    insteadOf = gh:

[url "git@git.krisyotam.com:"]
    insteadOf = ky:

[url "git@codeberg.org:"]
    insteadOf = cb:

[url "git@git.sr.ht:"]
    insteadOf = sr:

[url "git@gitlab.com:"]
    insteadOf = gl: