Hub rules-git

rules-git

v3 public Verified

Git

Git is a distributed version control system for tracking changes in source code during software development. These rules govern repository management, commit standards, and branching strategies for AI agents.

@sigmashakeinc 3 pulls 21 rules published Apr 8, 2026 synced Oct 11, 2026 sigmashakeinc/rules/rulesets/rules-git →
Severity
13 error 7 warn 1 info
demo.cast
Git is a distributed version control system for tracking changes in source code during software development. These rules govern repository management, commit standards, and branching strategies for AI agents.

Rules index

21 governance rules

Indexed from the repository's .rules files, grouped by technology. Expand any rule to read the raw source.

git

ask-amend-commit warning log

Amending commits rewrites history. If this commit has been pushed to a shared branch, amending requires a force push which affects others.

Rule source requires an active Pro or Enterprise subscription.
ask-branch-delete-force warning ask

Force branch deletion detected. This removes the branch even if it hasn't been merged. Verify the branch is no longer needed.

Rule source requires an active Pro or Enterprise subscription.
ask-checkout-destructive warning ask

Destructive checkout detected. This discards uncommitted changes permanently. Stash your work first if you want to recover it.

Rule source requires an active Pro or Enterprise subscription.
ask-rebase warning ask

Rebase rewrites commit history. On shared branches this causes problems for anyone who has pulled. Confirm this is on a local or personal branch.

Rule source requires an active Pro or Enterprise subscription.
ask-recurse-submodules-clone warning ask

Recursive submodule clone detected. RISK: CVE-2024-32002 and CVE-2025-48384 allow crafted submodules to write into .git/ and trigger post-checkout RCE on Git <2.50.1. FIX: clone without --recurse-submodules, inspect .gitmodules, then run 'git submodule update --init' on a trusted Git version.

Rule source requires an active Pro or Enterprise subscription.
ask-submodule-update-untrusted warning ask

Submodule update detected. RISK: CVE-2025-48384 — a carriage-return in a submodule path checks out files outside the worktree and can install a hook that executes on the next git command. FIX: verify .gitmodules has no control characters and ensure git >= 2.50.1.

Rule source requires an active Pro or Enterprise subscription.
ask-update-ref-delete warning ask

Direct ref deletion via update-ref detected. RISK: bypasses branch/tag safety checks and leaves no reflog entry for recovery. FIX: use 'git branch -d' or 'git tag -d' so the operation is logged and the default gc window can recover it.

Rule source requires an active Pro or Enterprise subscription.
deny-credential-helper-store error block

credential.helper=store is blocked. RISK: it writes plaintext credentials to ~/.git-credentials, readable by any process on the host. FIX: use an OS keychain helper (osxkeychain, manager-core, libsecret) or the short-lived 'cache' helper.

Rule source requires an active Pro or Enterprise subscription.
deny-filter-branch error block

git filter-branch is blocked. RISK: officially deprecated — has known safety and performance bugs that silently corrupt history. FIX: use 'git filter-repo' (https://github.com/newren/git-filter-repo), which is the project-recommended replacement.

Rule source requires an active Pro or Enterprise subscription.
deny-global-insteadof error block

Global/system url.*.insteadOf rewrites are blocked. RISK: silently redirects every future clone/fetch through an attacker host (supply-chain MITM). FIX: scope URL rewrites to a single repo with 'git config --local' after human review.

Rule source requires an active Pro or Enterprise subscription.
deny-reflog-expire-now error block

Immediate reflog expiry / gc prune is blocked. RISK: permanently deletes unreachable objects so mistakes from reset/rebase/branch-delete become unrecoverable. FIX: rely on the default 90-day reflog window, or prune with '--prune=1.day.ago' after a manual backup.

Rule source requires an active Pro or Enterprise subscription.
deny-write-git-hooks error block

Writing into .git/hooks is blocked. RISK: any executable placed there runs automatically on the matching git event (commit, checkout, merge) — a direct RCE foothold. FIX: use Husky, lefthook, or pre-commit which version-control hooks inside the repo under review.

Rule source requires an active Pro or Enterprise subscription.
log-merge-commit info log

Merge commit recorded. Consider 'git merge --no-ff' for a clear merge history, or use rebase on feature branches for a linear history.

Rule source requires an active Pro or Enterprise subscription.
no-commit-env-files error block

Committing secret files is blocked. Environment files and credentials must never enter version control. Add them to .gitignore immediately.

Rule source requires an active Pro or Enterprise subscription.
no-commit-node-modules error block

node_modules must not be committed. Add 'node_modules/' to .gitignore and use package.json + lockfiles to reproduce the install.

Rule source requires an active Pro or Enterprise subscription.
no-commit-temp-files error block

Temporary or debug file detected in git add. Remove it from staging — these files should be in .gitignore.

Rule source requires an active Pro or Enterprise subscription.
no-force-push error block

Force push is blocked. It rewrites shared history and can permanently destroy teammates' work. Use 'git revert' to undo changes safely.

Rule source requires an active Pro or Enterprise subscription.
no-fsmonitor-config error block

Setting core.fsmonitor to an arbitrary command is blocked. RISK: git executes this command on every invocation — an attacker-controlled value yields silent RCE. FIX: use the built-in 'true' fsmonitor daemon or leave the setting unset.

Rule source requires an active Pro or Enterprise subscription.
no-git-clean-force error block

Force-clean is blocked. It permanently deletes untracked files with no recovery path. Review untracked files with 'git status' first.

Rule source requires an active Pro or Enterprise subscription.
no-hard-reset error block

Hard reset is blocked. It permanently discards uncommitted changes and commits. Use 'git stash' to save work, or 'git revert' to undo commits safely.

Rule source requires an active Pro or Enterprise subscription.
no-hooks-path-override error block

Overriding core.hooksPath is blocked. RISK: redirecting hooks lets any future git operation execute attacker-controlled scripts (persistent RCE). FIX: keep hooks in the repo's default .git/hooks directory and review each hook before enabling.

Rule source requires an active Pro or Enterprise subscription.

Version metadata

Published metadata

The hash-locked record of this published ruleset. When source contents change, the maintainer resyncs and the version bumps.

Version
v3
Published
Apr 8, 2026
Source commits
0
Synced
Oct 11, 2026
Hash
77e9882d95b71f5c475e3a4d4fa004184ebc6f5c5e22ba61933dfa41806e219a
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

Latest commits touching rulesets/rules-git/.sigmashake/rules in sigmashakeinc/rules/rulesets/rules-git. The published version only bumps when a maintainer resyncs.

No commit history available.