dotfiles/.gitconfig
Joey Yakimowich-Payne 783636b4f7 Update files
2019-06-20 11:14:37 -06:00

19 lines
881 B
INI

[user]
email = jyapayne@gmail.com
name = Joey Yakimowich-Payne
[core]
editor = nvim
[color]
ui = auto
[push]
default = current
[alias]
basebranch = !bash -c 'git show-branch -a | grep "\\*" | grep -v $(git rev-parse --abbrev-ref HEAD) | head -n1 | sed \"s/.*\\[\\(.*\\)\\].*/\\1/\" | sed \"s/[\\^~].*//\"'
# list files which have changed since REVIEW_BASE
# (REVIEW_BASE defaults to 'master' in my zshrc)
files = !bash -c 'source $HOME/.bash_aliases && echo $(git basebranch) && git diff --name-only $(git merge-base HEAD \"$(git basebranch)\")'
# Same as above, but with a diff stat instead of just names
# (better for interactive use)
stat = !bash -c 'source $HOME/.bashrc && git diff --stat $(git merge-base HEAD \"$(git basebranch)\")'
review = !nvim -p $(git files) +\"tabdo Gdiff $(git basebranch)\" +\"let g:gitgutter_diff_base = '$(git basebranch)'\"