This repository has been archived by the owner on Sep 2, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig.erb
129 lines (91 loc) · 2.84 KB
/
gitconfig.erb
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
116
117
118
119
120
121
122
123
124
125
126
127
128
[apply]
whitespace = fix
[commit]
gpgsign = true
[core]
excludesfile = <%= ENV['HOME'] %>/.gitignore
editor = <%= ENV['EDITOR'] %>
staged = diff --cached
autocrlf = input
pager = less -r
[credential]
helper = osxkeychain
[format]
pretty = %C(yellow)%h%Creset %s %C(red)(%cr)%Creset
[pgp]
program = gpg
[push]
default = simple
[user]
name = <%= ENV['GIT_NAME'] %>
email = <%= ENV['GIT_EMAIL'] %>
signingkey = <%= ENV['GIT_PGPKEY'] %>
[color]
branch = auto
diff = auto
status = 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 = green
untracked = cyan
[difftool]
prompt = false
[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path "$MERGED" -- "$LOCAL" "$REMOTE"
[diff]
# make diffs easier to read
algorithm = patience
tool = Kaleidoscope
[diff "localizablestrings"]
textconv = "iconv -f utf-16 -t utf-8"
binary = false
[mergetool]
prompt = false
[mergetool "Kaleidoscope"]
cmd = ksdiff --merge --output "$MERGED" --base "$BASE" -- "$LOCAL" "$REMOTE"
[merge]
tool = Kaleidoscope
[merge "mergepbx"]
name = Xcode project files merger
driver = mergepbx %O %A %B
[alias]
# assume a file is unmodified for now
assume = update-index --assume-unchanged
unassume = update-index --no-assume-unchanged
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
# recursively initialize and update all submodules
checkout-submodules = submodule update --init --recursive
# copy the short hash of the last commit
copy-hash = !git rev-parse --short HEAD | perl -i -p -e 's/\n//' | pbcopy
# choose which changes within a file to add
patch = add --patch
# show a colourful, branched verison of history
history = log --graph --pretty=format:'%C(yellow)%h%Creset%C(blue)%d%Creset %C(white bold)%s%Creset %C(white dim)(by %an %ar)%Creset' --all
# show a list of all local files matched by your .gitignore
ignored = ls-files –others -i –exclude-standard
# fetch remote changes, then replay any unpushed commits on top of them
purr = pull ––rebase
# perform an interface rebase of unpushed commits
# clean up commit messages, squash dumb extra commits, etc
ready = rebase -i @{u}
# look for diffs that add or remove a reference to the provided string
search = log -S
# show commits that deleted files
show-deleted = log --diff-filter=D --summary
# backup working changes with a date-stamped stash
snapshot = !git stash save "snapshot: $(date)" && git stash apply "stash@{0}"
# shorter status
st = status -sb
# show all commits made in the past 24 hours
standup = !git log –since yesterday –author `git config user.email` –pretty=short
## move the last commit back to the index
undo = reset --soft HEAD^