vicky469_aside/scripts/hooks/pre-push
2026-07-19 17:13:57 +08:00

23 lines
570 B
Bash
Executable file

#!/usr/bin/env bash
# pre-push: enforce the public Aside repository's single-remote routing.
#
# Rule:
# origin → normal public Obsidian marketplace repository remote
#
# Install: git config core.hooksPath scripts/hooks
remote="$1"
if [[ "$remote" != "origin" ]]; then
echo ""
echo " BLOCKED: this public Aside checkout uses only the 'origin' remote."
echo ""
echo " Normal pushes should target origin:"
echo " git push origin <branch>"
echo ""
echo " Private package or service work belongs in a separate clone."
echo ""
exit 1
fi
exit 0