File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed
Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change @@ -74,27 +74,3 @@ git config --global core.hooksPath ~/.git-hooks
7474 ➡ Allowed with a warning.
7575
7676---
77-
78- # # Quick Install Script
79- ` ` ` bash
80- mkdir -p ~ /.git-hooks && \
81- cat > ~ /.git-hooks/pre-push << 'EOF '
82- #!/bin/sh
83- branch="$(git symbolic-ref --short HEAD)"
84- override_flag="--break_glass_to_push_main"
85-
86- if [ "$branch" = "main" ] || [ "$branch" = "master" ]; then
87- case "$*" in
88- *"$override_flag"* )
89- echo "⚠️ Override used: pushing to '$branch'..."
90- ;;
91- *)
92- echo "❌ Push to '$branch' is disabled locally."
93- echo " If you **really** need to, use: git push $override_flag"
94- exit 1
95- ;;
96- esac
97- fi
98- EOF
99- chmod +x ~ /.git-hooks/pre-push
100- git config --global core.hooksPath ~ /.git-hooks
You can’t perform that action at this time.
0 commit comments