-
Notifications
You must be signed in to change notification settings - Fork 2
/
gitconfig
114 lines (95 loc) · 3.21 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
113
114
# To use, copy the following to your ~/.gitconfig (adjust the email address as needed)
#
# [include]
# path = ~/git/dotfiles/gitconfig
#
# [user]
# email = [email protected]
[user]
name = Per Lundberg
signingkey = ~/.ssh/id_ed25519
[advice]
addEmptyPathSpec = false
[branch]
autosetuprebase = always
[commit]
# Automatically sign my commits with the key defined in user.signingkey.
# Note that gpg.format must be overridden to use SSH keys instead of pure
# GPG keys.
gpgsign = true
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = yellow
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
[core]
autocrlf = false
excludesfile = ~/.gitignore_global
ignorecase = false
editor = nano
# Note: this causes "diff-so-fancy: not found" errors if diff-so-fancy is
# not installed. Install on Debian or Ubuntu using
# https://gist.github.com/gmolveau/8fcdb5e953bd6c9dad18ecd39b9718a4, or
# override the config below with one of the following:
#
# git config --global core.pager '' # disables paging
# git config --global core.pager 'less' # reverts to the default git behavior.
pager = diff-so-fancy | less --tabs=4 -RFX
[diff]
noprefix = true
colorMoved = dimmed-zebra
[diff-so-fancy]
markEmptyLines = false
changeHunkIndicators = false
# Sign the commits with my SSH key
[gpg]
format = ssh
[alias]
amend = commit --amend --no-edit
amend-all = commit -a --amend --no-edit
branches = branch --sort=-committerdate --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
ci = commit
co = checkout
commits = cherry -v upstream/master
cp = cherry-pick
dc = diff --cached
fixup = !sh -c 'git commit --fixup $1' --
log-n = !sh -c 'git log HEAD~$1..HEAD --oneline' --
log-5 = log HEAD~5..HEAD --oneline
log-10 = log HEAD~10..HEAD --oneline
log-20 = log HEAD~20..HEAD --oneline
show-fuller = show --format=fuller
show-amend = diff HEAD@{1}
fetch = fetch --prune --all
pull = pull -r
reflog-with-date = reflog --date=iso
st = status --short
stat = status
tree = log --graph --oneline --all --decorate --tags
tree-current-branch = log --graph --oneline --decorate --tags HEAD
undo-amend = reset --soft HEAD@{1}
[log]
follow = true
[push]
# push the current branch back to the branch whose changes are usually
# integrated into the current branch (which is called @{upstream}). This
# mode only makes sense if you are pushing to the same repository you would
# normally pull from (i.e. central workflow).
default = upstream
# Automatically sets -u on default push when no upstream tracking exists for
# the current branch.
autoSetupRemote = true
[filter "media"]
clean = git-media-clean %f
smudge = git-media-smudge %f
[mergetool]
keepBackup = true
[init]
defaultBranch = master