Permalink
Switch branches/tags
Nothing to show
Find file Copy path
5c3c0de Feb 6, 2018
2 contributors

Users who have contributed to this file

@caius @pyrech
216 lines (214 sloc) 5.16 KB
[advice]
statusHints = true
pushNonFastForward = false
[alias]
## Spellings
ad = add
ass = add
dff = diff
doff = diff
emrge = merge
idff = diff
mergfe = merge
mregetool = mergetool
oull = pull
pish = push
pl = pull
ps = push
psuh = push
pu = up
puhs = push
puosh = push
pus = push
pushy = push
reabse = rebase
satsh = stash
sst = status -sb
t = status -sb
tint = init
tpull = pull
tpush = push
ts = status -sb
tst = status -sb
tup = up
fu = push --force-with-lease -u
## Shortcuts
st = status -sb
s = status -sb
b = branch -v
ci = commit
co = checkout
cob = checkout -b
cp = cherry-pick
l = log
a = add
d = diff
aa = add --all
aap = add --all -p
au = add -u
aua = add -u .
ap = add -p
pr = pull-request
tome = pull
toyou = push
cl = clone
vi = commit -v
via = commit -va
viaa = commit -va --amend
sui = submodule update --init
cot = checkout -t
dc = diff --cached
standup = log --since yesterday --oneline --author caius
dm = "!git diff | mate"
dcm = "!git diff --cached | mate"
x = "!gitx"
git = "!exec git"
gtfu = "!echo GET THE FUCK UP"
proj = "!proj"
nyan = "!nyancat 2> /dev/null || echo gem install nyancat"
# purge-merged = "git b -d `git b --merged | awk \"/^ / { print $1 }\" | xargs` || echo 'No branches to delete'\"
# From http://blog.apiaxle.com/post/handy-git-tips-to-stop-you-getting-fired/
assume = update-index --assume-unchanged
unassume = update-index --no-assume-unchanged
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
g = grep --break --heading --line-number
# TODO: extract into separate tool / take argument for branch to diff against?
show-missing-newlines-in-branch = "!git diff master | awk '/\\+\\+\\+/ { gsub(/w\\//, \"\", $2); last_filename = $2 }; /No newline at end of file/ { print last_filename }'"
fix-missing-newlines-in-branch = "!for file in $(git show-missing-newlines-in-branch); do echo >> $file; done"
sha = rev-parse HEAD
u = up
up = pull --rebase --autostash
praise = blame
stup = up
stas = stash
uip = up
iup = up
tpull-request = pull-request
recent = for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
tpr = !git pr
it = !git init && git commit -m "First!!!111oneone" --allow-empty
pre = pr
upsh = push
vin = commit -v -n
poush = push
add-p = add -p
[branch]
autosetupmerge = true
autosetuprebase = always
[color]
branch = auto
diff = auto
status = auto
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red italic
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[commit]
verbose = true
template = /Users/caius/.zsh/share/git/commit.txt
[core]
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = /Users/caius/.gitignore
preloadindex = true
attributesfile = /Users/caius/.gitattributes
# Deals with shitty projects having shitty line endings. Normally not needed.
# autocrlf = input
# safecrlf = true
[credential]
helper = osxkeychain
[diff]
renamelimit = 0
mnemonicprefix = true
renames = copies
algorithm = patience
submodule = log
compactionHeuristic = true
[diff "doc"]
textconv = strings
[diff "exif"]
textconv = exiftool
# [fetch]
# fsckObjects = true
# zeroPaddedFilemode = ignore
[filter "media"]
clean = git-media-clean %f
smudge = git-media-smudge %f
[fsck]
zeroPaddedFilemode = ignore
[grep]
extendRegexp = true
lineNumber = true
[help]
autocorrect = 0
[http]
sslverify = true
[hub]
protocol = https
[merge]
tool = mergemate
stat = true
ff = false
[merge "railsschema"]
name = newer Rails schema version
driver = "ruby -e '\n\
system %(git), %(merge-file), %(--marker-size=%L), %(%A), %(%O), %(%B)\n\
b = File.read(%(%A))\n\
b.sub!(/^<+ .*\\nActiveRecord::Schema\\.define.(:version =>|version:) (\\d+). do\\n=+\\nActiveRecord::Schema\\.define.(?::version =>|version:) (\\d+). do\\n>+ .*/) do\n\
%(ActiveRecord::Schema.define(#{$1} #{[$2, $3].max}) do)\n\
end\n\
File.open(%(%A), %(w)) {|f| f.write(b)}\n\
exit 1 if b.include?(%(<)*%L)'"
[mergetool]
keepBackup = false
[mergetool "mergemate"]
cmd = mate -wl1 \"$MERGED\"
trustExitCode = false
[push]
default = current
# [receive]
# fsckObjects = true
# zeroPaddedFilemode = ignore
[rerere]
enabled = true
[status]
showUntrackedFiles = all
submoduleSummary = true
[submodule]
fetchJobs = 4
# [transfer]
# fsckObjects = true
# zeroPaddedFilemode = ignore
[url "git://gist.github.com/"]
insteadOf = gist:
[url "git://github.com/"]
insteadOf = github:
[url "git@bitbucket.org:"]
insteadOf = bb:
pushInsteadOf = bitbucket:
pushInsteadOf = git://bitbucket.org/
[url "git@gist.github.com:"]
insteadOf = gst:
pushInsteadOf = gist:
pushInsteadOf = git://gist.github.com/
[url "git@github.com:"]
insteadOf = gh:
pushInsteadOf = github:
pushInsteadOf = git://github.com/
[url "git@gitlab.com:"]
insteadOf = gl:
pushInsteadOf = gitlab:
pushInsteadOf = git://gitlab.com/
[user]
name = Caius Durling
email = dev@caius.name
useconfigonly = true