-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig##default
147 lines (134 loc) · 4.42 KB
/
.gitconfig##default
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
[user]
name = Damien Ayers
email = [email protected]
signingkey = 1649A37AC79DAC84
[filter "hawser"]
clean = git hawser clean %f
smudge = git hawser smudge %f
required = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
process = git-lfs filter-process
[fetch]
# Auto delete deleted remote tracking branches
prune = true
prunetags = true
[push]
default = current
[core]
autocrlf = input
safecrlf = warn
excludesfile = ~/.gitignore_global
editor = vim
pager = delta
[branch]
# automatically sets the upstream of new branches to the branch you based it on
autoSetupRebase = always
# Sort the output of branches to show most recently committed to branches first.
[commit]
# Include the entire diff when editing commit messages
verbose = true
# gpgsign = true
[log]
# Show datetimes in my local time zone, instead of the timezone of the committer/author
date = local
[tag]
# Change the sort order of git tag to sort tags numerically and respect version numbers. This way, v10 comes after v9 instead of v1.
sort = version:refname
[alias]
l = "!. ~/.githelpers && pretty_git_log"
la = "!git l --all"
lr = "!git l -30"
lra = "!git lr --all"
lg = "!git l -G $1 -- $2"
feature = !sh -c 'git checkout --no-track -b $0 origin/main'
ruf = "!. ~/.githelpers && remove_untracked_files"
tree = log --oneline --decorate --graph
# Taken from here: https://aaronbonner.io/post/80766268890/git-alias-to-simplify-setting-upstream-branch
sup = "!git branch --set-upstream-to=origin/`git symbolic-ref --short HEAD`"
# lg = log --color --graph --pretty=format:'%C(yellow)%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
# ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
# Last branches
lb = !git reflog show --pretty=format:'%gs ~ %gd' --date=relative | grep 'checkout:' | grep -oE '[^ ]+ ~ .*' | awk -F~ '!seen[$1]++' | head -n 10 | awk -F' ~ HEAD@{' '{printf(\" \\033[33m%s: \\033[37m %s\\033[0m\\n\", substr($2, 1, length($2)-1), $1)}'
lnc = log --pretty=format:"%h\\ %s\\ [%cn]"
dl = "!git ll -1"
dlc = diff --cached HEAD^
hist = log --color --pretty=format:\"%C(yellow)%h%C(reset) %s%C(bold red)%d%C(reset) %C(green)%ad%C(reset) %C(blue)[%an]%C(reset)\" --relative-date --decorate
graph = log --color --graph --pretty=format:\"%h | %ad | %an | %s%d\" --date=short
recent = ! git branch --sort=-committerdate --format=\"%(committerdate:relative)%09%(refname:short)\" | head -10
smartlog = log --graph --pretty=format:'commit: %C(bold red)%h%Creset %C(red)[%H]%Creset %C(bold magenta)%d %Creset%ndate: %C(bold yellow)%cd %Creset%C(yellow)%cr%Creset%nauthor: %C(bold blue)%an%Creset %C(blue)[%ae]%Creset%n%C(cyan)%s%n%Creset'
sl = smartlog
# reset commands {{{
r1 = reset HEAD^
r2 = reset HEAD^^
rh = reset --hard
rh1 = reset HEAD^ --hard
rh2 = reset HEAD^^ --hard
branches = !legit branches
graft = !legit graft
harvest = !legit harvest
publish = !legit publish
unpublish = !legit unpublish
sprout = !legit sprout
sync = !legit sync
switch = !legit switch
resync = !legit resync
# }}}
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[pull]
rebase = true
[merge]
conflictstyle = zdiff3
tool = meld
[diff "jupyternotebook"]
command = git-nbdiffdriver diff
[merge "jupyternotebook"]
driver = git-nbmergedriver merge %O %A %B %L %P
name = jupyter notebook merge driver
[difftool "nbdime"]
cmd = git-nbdifftool diff \"$LOCAL\" \"$REMOTE\"
[difftool]
prompt = false
[mergetool "nbdime"]
cmd = git-nbmergetool merge \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
[mergetool]
prompt = false
[diff]
# Use difftastic for displaying diffs
tool = difft
# Used to be tool = vimdiff
algorithm = histogram
# histogram = patience is another good option
[magithub]
online = true
[magithub "status"]
includeStatusHeader = false
includePullRequestsSection = false
includeIssuesSection = false
[include]
path = ~/.private/gitconfig
[hub]
protocol = ssh
[github]
user = omad
[init]
defaultBranch = main
#[url "[email protected]:"]
# insteadOf = "https://github.com/"
#[url "[email protected]:"]
# insteadOf = "https://bitbucket.net/"
[ghq]
root = ~/dev
root = ~/go/src
[rerere]
enabled = true
[credential]
helper = /mnt/c/Program\\ Files/Git/mingw64/bin/git-credential-manager.exe
[credential "https://dev.azure.com"]
useHttpPath = true