forked from OzzyCzech/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
113 lines (90 loc) · 2.92 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
104
105
106
107
108
109
110
111
112
113
[user]
name = Roman Ožana
email = [email protected]
[color]
ui = always
[push]
default = current
[core]
editor = nano
excludesfile = ~/.gitignore_global
attributesfile = ~/.gitattributes
[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
[merge]
log = true
[alias]
mergedone = merge --no-ff --no-commit
c = commit -am
co = commit
fo = fetch origin
up = pull
p = push
s = status -s
st = status
di = diff
df = diff --color --color-words --abbrev
aa = add --all
# show tags sort by push date
tag-list = for-each-ref --format='%(refname:short) (%(committerdate:relative))' --sort=committerdate refs/tags
# display info about remote tags
tag-remote = ls-remote --tags origin
# show not pushed local tags
tag-local = !git ls-remote --tags origin | git show-ref --tags --exclude-existing
# prune local tags (delete not pushed tags)
tag-prune = fetch --prune --tags
# display most recent tag
tag-latest = describe --tags --abbrev=0
# remove untracked dirs, ignored files with force !
prune = clean -xdf
# show all conflicts
conflicts = !git ls-files -u | cut -f 2 | sort -u
# logs functions
wtf = log --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
l = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
# last changes
chlast = show --pretty="format:" --name-only
latest = branch -v
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
# git clone bb:user/repo
[url "[email protected]:"]
insteadOf = "bb:"
pushInsteadOf = "bitbucket:"
pushInsteadOf = "git://bitbucket.org/"
# git clone gh:user/repo
[url "[email protected]:"]
insteadOf = "gh:"
pushInsteadOf = "github:"
pushInsteadOf = "git://github.com/"
[url "git://github.com/"]
insteadOf = "github:"
# git clone gist:number
[url "[email protected]:"]
insteadOf = "gist:"
pushInsteadOf = "gist:"
pushInsteadOf = "git://gist.github.com/"
[url "git://gist.github.com/"]
insteadOf = "gist:"
# 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 "[email protected]:OzzyCzech/"]
insteadOf = "git://github.com/OzzyCzech/"
# See https://help.github.com/articles/checking-out-pull-requests-locally
[remote "origin"]
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*