Created
August 24, 2012 12:38
-
-
Save darrinholst/3450100 to your computer and use it in GitHub Desktop.
type git, type hg, this script don't care
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
export ORIGINAL_GIT=`which git` | |
export ORIGINAL_HG=`which hg` | |
git() { | |
if [ -d .hg ]; then | |
echo "perhaps you meant hg?" | |
"$ORIGINAL_HG" $@ | |
else | |
"$ORIGINAL_GIT" $@ | |
fi | |
} | |
hg() { | |
if [ -d .git ]; then | |
echo "perhaps you meant git?" | |
"$ORIGINAL_GIT" $@ | |
else | |
"$ORIGINAL_HG" $@ | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment