-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
68 lines (68 loc) · 2.52 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
[user]
email = andreas.kohn@gmail.com
name = Andreas Kohn
signingkey = 66E99F92
[credential]
# Note: This section will configured automatically in install.sh, the values here are for documentation
# only. Eventually this will need to be switched into a per-host configuration that is excluded from git ...
# For Linux
#helper = /usr/libexec/git-core/git-credential-libsecret
#helper = netrc
# For macOS
#helper = osxkeychain
[core]
editor = vi
pager = cat
whitespace = trailing-space,space-before-tab,tabwidth=4
excludesFile = ~/.gitignore
[diff]
renames = true
algorithm = histogram
compactionHeuristic = true
submodule = log
[log]
follow = true
[alias]
# ATTENTION: All aliases prefixed with ! run in /bin/sh make sure you use sh syntax, not bash/zsh or whatever
ci = commit
st = status
co = checkout
out = log --oneline @{u}..
glog = log --graph --oneline --decorate --all
up = pull --ff-only
tip = log --oneline HEAD^..HEAD
recentb = "!r() { refbranch=$1 count=$2; git for-each-ref --sort=-committerdate refs/heads --format='%(refname:short)|%(HEAD)%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)' --color=always --count=${count:-20} | while read line; do branch=$(echo \"$line\" | awk 'BEGIN { FS = \"|\" }; { print $1 }' | tr -d '*'); ahead=$(git rev-list --count \"${refbranch:-origin/${branch}}..${branch}\"); behind=$(git rev-list --count \"${branch}..${refbranch:-origin/${branch}}\"); colorline=$(echo \"$line\" | sed 's/^[^|]*|//'); echo \"$ahead|$behind|$colorline\" | awk -F'|' -vOFS='|' '{$5=substr($5,1,70)}1' ; done | ( echo \"ahead|behind||branch|lastcommit|message|author\\n\" && cat) | column -ts'|';}; r"
meld = !git difftool -t meld --dir-diff
[color]
ui = auto
[push]
default = simple
followTags = true
recurseSubmodules = check
[format]
# Or one of the predefined formats such as 'oneline'
pretty = %C(yellow)%h %C(cyan)%cD%Cred%d %Creset%s%Cgreen [%cn]%Creset
[status]
submodulesummary = 1
[commit]
gpgsign = true
verbose = true
[gpg]
program = gpg-wrapper
[tag]
forceSignAnnotated = true
[rebase]
autoStash = true
stat = true
updateRefs = true
# XXX: Ideally we would want to also configure --rebase-merges to be the default,
# but it seems that isn't available according to git-config(1)
[rerere]
enabled = true
autoupdate = true
[init]
defaultBranch = main
[merge]
# `zdiff3` requires git 2.35, use `diff3` before
# See https://github.blog/2022-01-24-highlights-from-git-2-35/
conflictstyle = zdiff3