forked from paulirish/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
95 lines (79 loc) · 2.28 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
[alias]
c = commit -am
up = pull
p = push
s = status -s
sclone = clone --depth=1
df = diff --color --color-words --abbrev
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
co = checkout
# Show the diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
# Merge GitHub pull request on top of the `master` branch
mpr = "!f() { \
if [ $(printf \"%s\" \"$1\" | grep '^[0-9]\\+$' > /dev/null; printf $?) -eq 0 ]; then \
git fetch origin refs/pull/$1/head:pr/$1 && \
git rebase master pr/$1 && \
git checkout master && \
git merge pr/$1 && \
git branch -D pr/$1 && \
git commit --amend -m \"$(git log -1 --pretty=%B)\n\nCloses #$1.\"; \
fi \
}; f"
[color]
ui = always
[core]
excludesfile = ~/.gitignore
attributesfile = ~/.gitattributes
# insanely beautiful diffs
pager = diff-highlight | diff-so-fancy | less -r
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
commit = green bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[color "status"]
added = yellow
changed = green
untracked = cyan
[merge]
tool = opendiff
[color "diff-highlight"]
oldNormal = "red bold"
oldHighlight = "red bold 52"
newNormal = "green bold"
newHighlight = "green bold 22"
# rewrites
[url "git@github.com:"]
insteadOf = "gh:"
insteadOf = "git://github.com"
pushInsteadOf = "github:"
pushInsteadOf = "git://github.com/"
pushInsteadOf = "https://github.com/"
[url "git@gist.github.com:"]
insteadOf = "gst:"
pushInsteadOf = "gist:"
pushInsteadOf = "git://gist.github.com/"
pushInsteadOf = "https://gist.github.com/"
# Any GitHub repo with my username should be checked out r/w by default
# http://rentzsch.tumblr.com/post/564806957/public-but-hackable-git-submodules
[url "git@github.com:paulirish/"]
insteadOf = "git://github.com/paulirish/"
[help]
autocorrect = 1
# push easily. http://stackoverflow.com/a/23918418/89484
[push]
default = current
[include]
# For username / github token / etc
path = ~/.gitconfig.local
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true