Skip to content

Instantly share code, notes, and snippets.

@AaronDMarasco-VSI
Created October 19, 2018 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AaronDMarasco-VSI/cc132938341d5ddff6837b437463047a to your computer and use it in GitHub Desktop.
Save AaronDMarasco-VSI/cc132938341d5ddff6837b437463047a to your computer and use it in GitHub Desktop.
Useful git alias to put in .bashrc
# Usage: git diff -b `fork_point`
# or git diff -b `fork_point develop`
fork_point() {
upstream=$1
git merge-base --fork-point ${upstream:-"origin/master"} HEAD
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment