-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig
97 lines (86 loc) · 2.94 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
[user]
name = Ivan Tanev
email = [email protected]
[color]
branch = auto
status = auto
diff = auto
ui = auto
[branch]
autosetupmerge = true
[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 = green
untracked = cyan
[core]
whitespace=fix;-indent-with-non-tab,trailing-space,cr-at-eol
autocrlf = true
editor = vim
[alias]
st = status -sb
aa = add --all
ci = commit
co = checkout
df = diff
dfw = diff --word-diff
dc = diff --cached
dcw = diff --cached --word-diff
ig =!([ ! -e .gitignore ] && touch .gitignore) | echo $1 >>.gitignore
alias = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\t=> \\2/' | sort
amend = commit --amend
famend = !git log -n 1 --pretty=tformat:%s%n%n%b | git commit -F - --amend
h = !git head
l = log --pretty=format:'%C(yellow)%h%Creset %Cgreen(%ar)%Creset %C(bold blue)<%an>%Creset %s%C(red)%d%Creset' --graph --date=relative
la = !git l --all
r = !git l -20
ra = !git r --all
ff = merge --ff-only
pullff = pull --ff-only
noff = merge --no-ff
fp = fetch --prune
po = push origin
pom = push origin master
pod = push origin develop
br = branch
tagdate = !git tag `date "+%Y%m%d%H%M"`
# Show status and diff of dirty submodules
subdiff = !"git submodule foreach --recursive --quiet '[ \"$(git status -s)\" ] && echo \"--- $name ---\" && git status -s && git diff --unified=1 || :'"
# Pull all submodules
subpull = !"git submodule foreach git pull"
# Update all submodules
subupdate = !"git submodule sync && git submodule update --init --recursive"
# Checkout master branch of all submodules
subcheckout = !"git submodule foreach git checkout master"
# Reset all submodules
subreset = !"git submodule foreach --recursive git checkout -- . && git submodule foreach --recursive git clean -f"
# show list of contributors in descending order by number of commits
rank = shortlog -sn --no-merges
# given any git object, try to show it briefly
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short
# Search for a given string in all patches and print commit messages
# example: search for any commit that adds or removes string "foobar"
# git searchcommits foobar
# example: search commits for string "foobar" in directory src/lib
# git searchcommits foobar src/lib
# example: search commits for "foobar", print full diff of commit with 1 line context
# git searchcommits foobar --pickaxe-all -U1 src/lib
searchcommits = "!f() { query=\"$1\"; shift; git log -S\"$query\" \"$@\"; }; f \"$@\""
[gui]
encoding = utf-8
[push]
default = simple
[transfer]
fsckobjects = true
[fetch]
fsckobjects = true
[receive]
fsckObjects = true