Skip to content

Instantly share code, notes, and snippets.

@qsLI
Created September 10, 2017 18:58
Show Gist options
  • Save qsLI/c0f4c29827595aa614ae789d9a84dd34 to your computer and use it in GitHub Desktop.
Save qsLI/c0f4c29827595aa614ae789d9a84dd34 to your computer and use it in GitHub Desktop.
git config --global alias.oa '!zsh -c '\''diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "${1:-master}") <(git rev-list --first-parent "${2:-HEAD}") | head -1'
git config --global alias.branchdiff '!sh -c "git diff `git oa`.."'
git config --global alias.branchlog '!sh -c "git log `git oa`.."'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment