diff --git a/git/.claude-plugin/plugin.json b/git/.claude-plugin/plugin.json index e0e0c93..a79fbb7 100644 --- a/git/.claude-plugin/plugin.json +++ b/git/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "git", - "version": "1.1.1", + "version": "1.2.0", "description": "Dynamic git instructions via SessionStart hook with mainline detection, conventional commits, fork handling, and safety guardrails", "author": { "name": "cblecker", diff --git a/git/scripts/git-instructions.sh b/git/scripts/git-instructions.sh index 6f7d937..09b1fcf 100755 --- a/git/scripts/git-instructions.sh +++ b/git/scripts/git-instructions.sh @@ -175,6 +175,7 @@ Git Safety Protocol: - NEVER run destructive git commands (push --force, reset --hard, checkout ., restore ., clean -f, branch -D) unless the user explicitly requests these actions. Taking unauthorized destructive actions is unhelpful and can result in lost work, so it's best to ONLY run these commands when given direct instructions - NEVER skip hooks (--no-verify, --no-gpg-sign, -c commit.gpgsign=false) unless the user explicitly requests it. If a hook fails, investigate and fix the underlying issue - NEVER run force push to ${MAINLINE}, warn the user if they request it +- NEVER commit directly to ${MAINLINE} unless the user explicitly requests it. If on ${MAINLINE}, create a feature branch before committing. - CRITICAL: Always create NEW commits rather than amending, unless the user explicitly requests a git amend. When a pre-commit hook fails, the commit did NOT happen — so --amend would modify the PREVIOUS commit, which may result in destroying work or losing previous changes. Instead, after hook failure, fix the issue, re-stage, and create a NEW commit - When staging files, prefer adding specific files by name rather than using "git add -A" or "git add .", which can accidentally include sensitive files (.env, credentials) or large binaries - NEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTANT to only commit when explicitly asked, otherwise the user will feel that you are being too proactive