-
Notifications
You must be signed in to change notification settings - Fork 9
/
.gitconfig
56 lines (43 loc) · 1.74 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
# -*- sh -*-
# Documented in git-config(1).
[user]
name = Michael Stillwell
email = mjs@beebo.org
[core]
excludesfile = ~/.gitignore
[diff]
mnemonicprefix = true
[alias]
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
vlog = log --name-status
type = cat-file -t
dump = cat-file -p
stat = status -sb
svnpull = !git diff --no-ext-diff --quiet --exit-code && ( git svn fetch && git svn rebase ) || ( git stash && git svn fetch && git svn rebase && git stash pop )
svnpush = !git diff --no-ext-diff --quiet --exit-code && ( git svn dcommit ) || ( git stash && git svn dcommit && git stash pop )
resethard = reset --hard HEAD
# http://stackoverflow.com/a/10693888/11543
branch-by-date = for-each-ref --sort=-committerdate refs/heads/ --format='%(refname:short) %(committerdate:short) %(authorname)'
# Ignore/unignore changes to files (like a local .gitignore)
# http://durdn.com/blog/2012/11/22/must-have-git-aliases-advanced-examples/
assume = update-index --assume-unchanged
unassume = update-index --no-assume-unchanged
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
unassumeall = "!git assumed | xargs git update-index --no-assume-unchanged"
assumeall = "!git status -s | awk {'print $2'} | xargs git assume"
[bash]
# If GIT_PS1_SHOWDIRTYSTATE is set and bash.showDirtyState is 1,
# display dirty state indicator. (Defaulting to on; disable
# in .git/config on very large repositories.)
showDirtyState = 1
[advice]
pushNonFastForward = false
statusHints = true
[push]
default = upstream
[merge]
defaultToUpstream = true
[hooks]
preCommitRegexp = rawlog|console\\.log
[init]
templatedir = ~/.config/templates