Skip to content

Instantly share code, notes, and snippets.



Last active Apr 14, 2019
What would you like to do?
Shell script for pre-rebase git hook to disable rebasing on different branch
# disallows rebasing on different branch only
if [ ! -z $2 ]; then
echo "pre-rebase: Rebasing is dangerous, follow the golden rules of rebasing."
exit 1
echo "pre-rebase: Be careful of what you do"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment