-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitconfig
93 lines (93 loc) · 2.53 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
93
# Local/private config goes in the include
[include]
path = ~/.gitconfig.local
[init]
defaultBranch = main
[core]
editor = vim
precomposeUnicode = true
[color]
ui = auto
[alias]
s = status
c = commit
a = add
d = difftool
dc = difftool --cached
ch = switch
b = switch -c
p = pull
all = add -A
amend = commit --amend
fix = commit --amend -C HEAD
fixup = !sh -c 'git commit --fixup=$1' -
squash = !sh -c 'git commit --squash=$1' -
brushup = rebase -i main
trash = branch -D
count = !git shortlog -sn
undo = reset --soft HEAD~1
undoundo = reset --hard HEAD~1
unstage = reset HEAD --
wip = stash --keep-index --include-untracked
resume = "!$EDITOR $(git ls-files -m)"
unstash = stash pop --index
tfo = !git restore . && git clean -fd
snapshot = !git stash save "snapshot: $(date)" && git stash apply "stash@{0}"
ours = "!f() { git checkout --ours $@ && git add $@; }; f"
theirs = "!f() { git checkout --theirs $@ && git add $@; }; f"
l = log --oneline -n 10 --graph --abbrev-commit
today = !sh -c 'git log --since midnight --oneline --author $(git config user.email)'
standup = !sh -c 'git log --since yesterday --oneline --author $(git config user.email)'
last = log -n 1
outgoing = log @{push}.. --oneline --no-decorate --cherry-mark
incoming = log ..@{u} --oneline --no-decorate --cherry-mark
ahead = log origin/main..HEAD --oneline --no-decorate --cherry-mark
behind = log HEAD..origin/main --oneline --no-decorate --cherry-mark
comp = !sh -c 'git log --oneline $1..$2' -
latest = for-each-ref --sort -committerdate --format='%(committerdate:short) %(refname:short)'
tm = commit-template set
untm = commit-template unset
# Show verbose output about tags, branches, remotes or stashes
tags = tag -l
branches = branch -a
remotes = remote -v
stashes = stash list
[pull]
rebase = true
[push]
default = simple
[commit]
gpgSign = true
verbose = true
[tag]
gpgSign = true
[rebase]
autoSquash = true
autoStash = true
updateRefs = true
[rerere]
enabled = true
[mergetool "Kaleidoscope"]
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
trustExitCode = true
[mergetool]
keepBackup = true
prompt = false
[merge]
conflictStyle = zdiff3
tool = Kaleidoscope
[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[difftool]
prompt = false
[diff]
algorithm = histogram
tool = Kaleidoscope
compactionHeuristic = true
[help]
autoCorrect = 10
[user]
name = Klaus Hartl
useConfigOnly = true
[branch]
sort = -committerdate