#!/bin/sh
branch=$(git symbolic-ref --quiet --short HEAD) || exit 0
if [ "$branch" = main ]; then
    echo 'Create a work branch before committing: git switch -c fix/your-change' >&2
    exit 1
fi
