Created
February 12, 2019 20:49
-
-
Save mlsteele/283574eb57d58a7d16a8f21d9c364993 to your computer and use it in GitHub Desktop.
You just ran `git merge origin/master`. But what happened?
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
#!/usr/bin/env bash | |
# You just ran `git merge origin/master`. But what happened? | |
# Shows the diff between | |
# - your changes from old master before merging | |
# - your changes from NEW master AFTER merging | |
COMMON_ANCESTOR=$(git merge-base $(git show -s --pretty=%P HEAD)) | |
git d $COMMON_ANCESTOR..HEAD^1 > /tmp/diff1.txt | |
git d HEAD^2..HEAD > /tmp/diff2.txt | |
kdiff3 /tmp/diff{1,2}.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment