forked from vivien/dotfiles
/
gitconfig
115 lines (107 loc) · 4.3 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
114
115
[color]
status = auto
branch = auto
diff = auto
interactive = auto
# ui = true
[core]
editor = vim
quotepath = false
pager = less -FRSX
excludesfile = ~/.gitignore
## see http://lostechies.com/keithdahlby/2011/04/06/windows-git-tip-hide-carriage-return-in-diff/
autocrlf = false
whitespace = cr-at-eol
[github]
#user = olifante
#user = tiago-g-henriques
[alias]
s = status -sb
b = branch
ba = branch -a
br = branch -r
cm = commit -m
cam = commit -am
co = checkout
dc = diff --cached
d = diff
dt = difftool
mt = mergetool
ls = ls-files
last = cat-file commit HEAD
# Show files ignored by git:
ignored = ls-files --others --ignored --exclude-standard
ignored1 = ls-files --others --ignored --exclude-from=~/.gitignore
ignored2 = ls-files --others --ignored --exclude-from=.gitignore
ignored3 = ls-files --others --ignored --exclude-from=.git/info/exclude
ignored0 = clean -ndX
# safe removal of .git/config sections
remove-section = config -f .git/config --remove-section # e.g. git remove-section submodule.CoconutKit
# log aliases
lpatch = log -p
lfuller = log --pretty=fuller --abbrev-commit
lfull = log --pretty=full --abbrev-commit
lmedium = log --pretty=medium --abbrev-commit
lshort = log --pretty=short --abbrev-commit
l1 = log --pretty=oneline --abbrev-commit
l = log --pretty=oneline --abbrev-commit --graph --decorate -20
la = log --pretty=oneline --abbrev-commit --graph --decorate -20 --all
lol = log --pretty=oneline --abbrev-commit --graph --decorate
lola = log --pretty=oneline --abbrev-commit --graph --decorate --all
lg = log --pretty=oneline --abbrev-commit -g # searches reflog
# log search aliases
lgrep = log --pretty=oneline --abbrev-commit --grep
lstring = log --pretty=oneline --abbrev-commit -S
lregex = log --pretty=oneline --abbrev-commit -G
lggrep = log --pretty=oneline --abbrev-commit -g --grep # searches reflog
lgstring = log --pretty=oneline --abbrev-commit -g -S # searches reflog
lgregex = log --pretty=oneline --abbrev-commit -g -G # searches reflog
add-unmerged = \
"!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`"
# "!f() { git status --porcelain | grep '^[ADU][ADU]' | cut -d' ' -f2 }; git add `f`"
edit-unmerged = \
"!f() { git ls-files --unmerged | cut -f2 | sort -u }; mate `f`"
# "!f() { git status --porcelain | grep '^UU' | cut -d' ' -f2 }; mate `f`"
[push]
default = tracking
[branch]
autosetuprebase = always
[branch "master"]
rebase = true
[diff]
tool = p4diff
[difftool "echo"]
cmd = "echo.sh \"$LOCAL\" \"$REMOTE\""
[difftool "filemerge"]
cmd = "opendiff \"$LOCAL\" \"$REMOTE\""
[difftool "diffmerge"]
cmd = "diffmerge.sh \"$LOCAL\" \"$REMOTE\""
[difftool "araxis"]
cmd = $HOME/bin/Utilities/araxisgitdiff
[difftool "p4diff"]
#cmd = "/Applications/p4merge.app/Contents/MacOS/p4merge \"$LOCAL\" \"$PWD/$REMOTE\""
cmd = "/Applications/p4merge.app/Contents/Resources/launchp4merge \"$LOCAL\" \"$PWD/$REMOTE\""
[diff "localizablestrings"]
## add this line to your .gitattributes or .git/info/attributes file
## to allow git to diff UTF-16 files such as Localizable.strings
## *.strings diff=localizablestrings
textconv = "iconv -f utf-16 -t utf-8"
[merge]
tool = custom_p4merge
[mergetool]
keepBackup = false
[mergetool "diffmerge"]
cmd = "diffmerge --merge --result=\"$MERGED\" \"$LOCAL\" \"$(if test -f \"$BASE\"; then echo \"$BASE\"; else echo \"$LOCAL\"; fi)\" \"$REMOTE\""
trustExitCode = true
[mergetool "araxis"]
cmd = "$HOME/bin/Utilities/araxisgitmerge \"$PWD/$REMOTE\" \"$PWD/$BASE\" \"$PWD/$LOCAL\" \"$PWD/$MERGED\""
trustExitCode = false
[mergetool "ecmerge"]
path = /Applications/ECMerge.app/Contents/MacOS/guimerge
[mergetool "custom_p4merge"]
cmd = "/Applications/p4merge.app/Contents/Resources/launchp4merge \"$PWD/$BASE\" \"$PWD/$LOCAL\" \"$PWD/$REMOTE\" \"$PWD/$MERGED\""
keepTemporaries = false
trustExitCode = false
[user]
name = Tiago Henriques
email = trinosauro@gmail.com