Last active
December 20, 2016 16:29
-
-
Save chrisdarroch/07d0e61d9cd68e5f2b9b5126a6c233bd to your computer and use it in GitHub Desktop.
A shell function that shows you the difference a Git branch made at the point it branched from your current one
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function gdist { | |
basename="$1" | |
basesha="git merge-base HEAD $basename" | |
git diff "$basesha" "$basename" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gdist () { | |
basename="$1" | |
basesha="`git merge-base HEAD $basename`" | |
git diff -M "$basesha" "$basename" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment