-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdot_gitconfig.tmpl
More file actions
122 lines (97 loc) · 2.56 KB
/
Copy pathdot_gitconfig.tmpl
File metadata and controls
122 lines (97 loc) · 2.56 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
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
[user]
email = {{ .email }}
name = {{ .name }}
# Per-account identity, selected by the repo's remote URL (the gh-<account>
# alias). Plain git@github.com defaults to abkolan, matching ~/.ssh/config.
[includeIf "hasconfig:remote.*.url:gh-abkolan:*/**"]
path = ~/.gitconfig-abkolan
[includeIf "hasconfig:remote.*.url:git@github.com:*/**"]
path = ~/.gitconfig-abkolan
[includeIf "hasconfig:remote.*.url:gh-abhilast:*/**"]
path = ~/.gitconfig-abhilast
[pull]
rebase = true
[alias]
# Status and info
st = status -sb
ll = log --oneline --graph --decorate -15
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
# Workflow
co = checkout
br = branch
cm = commit -m
cam = commit -am
unstage = reset HEAD --
last = log -1 HEAD
# Advanced
find = "!git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%an]' --decorate --date=short --grep"
cleanup = "!git branch --merged | grep -v '\\*\\|master\\|main\\|develop' | xargs -n 1 git branch -d"
# Diff shortcuts
d = diff
dc = diff --cached
dt = difftool
dtc = difftool --cached
# Branch management
brd = branch -d
brD = branch -D
# Stash shortcuts
s = stash
sp = stash pop
sl = stash list
# Remote
f = fetch
fo = fetch origin
p = push
pl = pull
# Rebase
rb = rebase
rbi = rebase -i
rbc = rebase --continue
rba = rebase --abort
[diff]
tool = difftastic
algorithm = histogram
colorMoved = default
[difftool]
prompt = false
[difftool "difftastic"]
cmd = difft "$LOCAL" "$REMOTE"
[difftool "nvimdiff"]
cmd = nvim -d $LOCAL $REMOTE
[merge]
tool = nvimdiff
conflictstyle = diff3
[mergetool "nvimdiff"]
cmd = nvim -d $LOCAL $MERGED $REMOTE
[pager]
difftool = true
[core]
# Use delta for better diffs
pager = delta
[interactive]
diffFilter = delta --color-only --features=interactive
[delta]
navigate = true
{{- if eq .chezmoi.os "darwin" }}
{{- $appearance := output "sh" "-c" "defaults read -g AppleInterfaceStyle 2>/dev/null || echo Light" | trim }}
{{- if eq $appearance "Dark" }}
light = false
{{- else }}
light = true
{{- end }}
{{- else }}
light = false
{{- end }}
side-by-side = true
line-numbers = true
[rebase]
autoStash = true
[init]
defaultBranch = main
[color]
ui = auto
[credential]
helper =
helper = /usr/local/share/gcm-core/git-credential-manager
[credential "https://dev.azure.com"]
useHttpPath = true