Last active
April 14, 2019 13:20
-
-
Save goyalmohit/b56ae5942811e7b2447966482255c509 to your computer and use it in GitHub Desktop.
Shell script for pre-rebase git hook to disable rebasing on different branch
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
#!/bin/sh | |
# disallows rebasing on different branch only | |
if [ ! -z $2 ]; then | |
echo "pre-rebase: Rebasing is dangerous, follow the golden rules of rebasing." | |
exit 1 | |
else | |
echo "pre-rebase: Be careful of what you do" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment