/
.gitconfig
112 lines (92 loc) · 2.75 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
[alias]
aa = add --all
ap = add --patch
ca = commit --amend
ci = commit -v -S
co = checkout
co-pr = !sh -c 'git fetch origin pull/$1/head:pr/$1 && git checkout pr/$1' -
create-branch = !sh -c 'git push origin HEAD:refs/heads/$1 && git fetch origin && git branch --track $1 origin/$1 && cd . && git checkout $1' -
ctags = "!sh -c '[ -f .git/hooks/ctags ] || git init; .git/hooks/ctags' git-ctags"
delete-branch = !sh -c 'git push origin :refs/heads/$1 && git branch -D $1' -
merge-branch = !git checkout master && git merge @{-1}
pr = !gh pull-request
st = status
up = !git fetch origin && git rebase origin/master
lo = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
pf = push --force-with-lease
di = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
dii = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
pa = !"git pull; git submodule foreach git pull origin master"
cr = clone --recursive
go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
amend = commit --amend --reuse-message=HEAD
reb = "!r() { git rebase -i HEAD~$1; }; r"
fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
[apply]
whitespace = fix
[core]
excludesfile = ~/.gitignore
attributesfile = ~/.gitattributes
whitespace = space-before-tab,-indent-with-non-tab,trailing-space
autocrlf = input
trustctime = false
precomposeunicode = false
editor = vim
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold # line info
old = red # deletions
new = green # additions
[color "status"]
added = green
changed = yellow
untracked = cyan
[commit]
template = ~/.gitmessage
[diff]
renames = copies
indentHeuristic = true
[diff "bin"]
textconv = hexdump -v -C
[help]
autocorrect = 1
[merge]
log = true
ff = only
[push]
default = current
followTags = true
[commit]
template = ~/.gitmessage
[fetch]
prune = true
[user]
name = dd di cesare
email = didi@posteo.net
signingkey = [REPLACE_WITH_KEY]
# URL shorthands
[url "git@github.com:"]
insteadOf = "gh:"
pushInsteadOf = "github:"
pushInsteadOf = "git://github.com/"
[url "git://github.com/"]
insteadOf = "github:"
[url "git@gist.github.com:"]
insteadOf = "gst:"
pushInsteadOf = "gist:"
pushInsteadOf = "git://gist.github.com/"
[url "git://gist.github.com/"]
insteadOf = "gist:"
[credential]
helper = osxkeychain
[filter "lfs"]
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f