-
-
Save sharplet/cd3f4cab8e70768be110 to your computer and use it in GitHub Desktop.
Disable git at the terminal, but still allow shelling out
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
#!/bin/sh | |
if [ -t 1 ]; then | |
echo LOL >&2 | |
exit 1 | |
else | |
real_git=$(type -a git | head -2 | tail -1 | cut -d" " -f 3) | |
exec "$real_git" ${*} | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment