Last active
October 21, 2016 17:56
-
-
Save wejrowski/fda56cae65a7366a4118d1174d928bd5 to your computer and use it in GitHub Desktop.
Git diff branch changes
This file contains hidden or 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
# Shoot.. this is pointless actually. You can do this by `git diff origin/development...HEAD` | |
# Do a git diff between development, only on your changes by finding | |
# the last commit hash in your branch which is in development and diffing on that. | |
origin_development_hashes=$(git log --pretty=format:'%H' origin/development | tail -300) | |
for hash in `git log --pretty=format:'%H' | tail -300`; do; | |
[[ $origin_development_hashes =~ "$hash" ]] && found=$hash && break; | |
done; | |
if [ $found != "" ]; then | |
git diff $found.. | |
else | |
diff origin/development.. | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment