Created
January 28, 2015 01:58
-
-
Save tiborvass/6f896b8550942eed251b to your computer and use it in GitHub Desktop.
git mdiff
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
[alias] | |
mdiff = "!f() { git stash | head -1 | grep -q 'No local changes to save'; x=$?; git merge --no-commit $1 &>/dev/null; git add -u &>/dev/null; git diff --staged; git reset --hard &>/dev/null; test $x -ne 0 && git stash pop &>/dev/null; }; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment