-
Notifications
You must be signed in to change notification settings - Fork 31
/
.gitconfig
96 lines (81 loc) · 2.26 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
[user]
name = Wynn Netherland
email = wynn.netherland@gmail.com
signingkey = 8CE799D8B3EE3EE9
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = blue
untracked = cyan
[alias]
# show all branches, even across remotes
branches = branch -a --color -v
# remove all local branches included in the current branch
cleanup = !sh -c 'git branch --merged | grep -E "^[^*]" --exclude "^\\s*master" | xargs -n1 git branch -d'
co = checkout
ctags = !.git/hooks/ctags
# Get short SHA-1 for object
hash = rev-parse --short HEAD
lc = log ORIG_HEAD.. --stat --no-merges
# just for fun
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
ls = ls-files
mybranches = "!f() { if test $# = 0 ; then set -- refs/remotes ; fi ; git for-each-ref --format='%(authordate:relative)\t%(refname:short)\t%(authoremail)' --sort=authordate \"$@\" | sed -ne \"s/\t<$(git config user.email)>//p\" | column -s '\t' -t ; } ; f"
# depends on hub
mypulls = browse -- pulls/pengwynn
safe = !mkdir -p .git/safe && echo "Repository marked safe!"
# track a remote branch
track = checkout -t
# update all submodules
subs = submodule foreach git pull origin master
# clean up fully merged branches
sweep = !git-sweep
# list only untracked files
untracked = ls-files --others --exclude-standard
# remove a file from the index
unstage = reset HEAD --
up = "!git remote update -p; git merge --ff-only @{u}"
wdiff = diff --color-words
wip = "!$EDITOR $(git ls-files -m)"
ri = rebase -i --autosquash
mri = rebase -i
fix = commit --fixup
squ = commit --squash
[init]
templatedir = ~/.git_template
[push]
default = upstream
[hub]
protocol = https
[branch]
[github]
user = pengwynn
[difftool]
prompt = false
[diff]
tool = vimdiff
[credential]
helper = osxkeychain
[web]
browser = open
[filter "media"]
clean = git-media-clean %f
smudge = git-media-smudge %f
[core]
excludesfile = ~/.gitignore_global
; [commit]
; gpgsign = true
[gpg]
program = /usr/local/bin/gpg
# vim: ft=gitconfig sw=2 ts=2 et