Skip to content

Instantly share code, notes, and snippets.

@davetorbeck
Last active March 11, 2018 23:39
Show Gist options
  • Save davetorbeck/3b4a368de2b97bd2971729afe5b82066 to your computer and use it in GitHub Desktop.
Save davetorbeck/3b4a368de2b97bd2971729afe5b82066 to your computer and use it in GitHub Desktop.
self explanatory
[user]
name = David T
email = davetorbeck@gmail.com
[core]
excludesfile = /Users/davidtorbeck/.gitignore_global
editor = subl -n -w
[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
[alias]
s = status
b = branch
co = checkout
ec = config --global -e
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
cob = checkout -b
cm = !git add -A && git commit -m
save = !git add -A && git commit -m 'SAVEPOINT'
wip = !git add -u && git commit -m "WIP"
undo = reset HEAD~1 --mixed
amend = commit -a --amend
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
sc = diff-tree -p
bclean = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs -r git branch -d; }; f"
bdone = "!f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f"
logp = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
delete = branch -D
[mergetool "sublime"]
cmd = subl -w $MERGED
trustExitCode = false
[merge]
tool = sublime
[push]
default = current
[mergetool]
keepBackup = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment