-
Notifications
You must be signed in to change notification settings - Fork 2
/
gitconfig
103 lines (83 loc) · 2.62 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
[user]
name = Joshua Priddle
signingkey = E7ED7E4CEC917FE0
[color]
ui = auto
[color "status"]
header = yellow bold
added = green bold
updated = green reverse
changed = magenta bold
untracked = red
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[branch]
sort = -authordate
[push]
default = current
[fetch]
prune = true
[merge]
ff = only
tool = fugitive
[pull]
rebase = true
[commit]
cleanup = scissors
[core]
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[format]
pretty = format:%C(red)%h%Creset%C(yellow)%d%Creset %C(magenta)%an%Creset: %s %C(green)(%ar)%Creset
[alias]
amend = !git commit --amend --date=\"$(date)\" -C HEAD
branch-name = rev-parse --abbrev-ref HEAD
copy-last-sha = !git last-sha | tr -d '\n' | pbcopy
full-log = log --format=fuller
last-sha = rev-parse --short HEAD
lg = log --graph --abbrev-commit --date=relative
man = help --man
msg = commit --allow-empty -m
pa = add --patch
pending = !git --no-pager log @{u}.. && echo
undo = reset --soft HEAD^
unstage = reset HEAD -- ...
web = instaweb --httpd=webrick -b open
prune-branches = !git branch --merged | grep -v '^master$' | grep -v "\\\\*" | xargs -n 1 git branch -d
fetch-pr = "!f() { git fetch origin refs/pull/$1/head:pr/$1; } ; f"
recent-branches = for-each-ref --count=10 --sort=-committerdate --format=\"%(refname:short)\" refs/heads/
fixup = "!f() { git commit $* --fixup HEAD; }; f"
pulls = browse -- pulls
root = rev-parse --show-toplevel
strip-whitepsace = !git ls-files | xargs perl -i -pe 's/[\\t ]+$//g'
showf = show --format=fuller
prq = pull-request --push --copy --browse
todo = grep -wniI -e TODO -e FIXME
last-committer = !git --no-pager log --pretty="%an" --no-merges -1
last-subject = !git --no-pager log --pretty="%s" -1
show-files = !git --no-pager show --name-only --format=
last-pull-sha = !"git reflog | awk '/: pull / { if (l == 1) { print $1; exit }; l+=1 }'"
[advice]
statusHints = false
pushNonFastForward = false
[rebase]
autosquash = true
autostash = true
[stash]
showStat = true
showPatch = true
[status]
short = true
branch = true
[include]
path = ~/.gitconfig.local
[init]
defaultBranch = master
[mergetool "fugitive"]
cmd = vim -f -c \"Gdiff\" \"$MERGED\"
; vim:ft=gitconfig