Esta página se muestra en inglés. Una traducción al español está en curso.
ConfigsJul 21, 2026·2 min de lectura

no-mistakes — Git Push Safety Guard

Lightweight CLI tool that prevents accidental git pushes by enforcing pre-push checks, branch protection rules, and confirmation prompts.

Listo para agents

Instalación lista para agent

Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
no-mistakes
Comando de instalación directa
npx -y tokrepo@latest install c0640919-8523-11f1-9bc6-00163e2b0d79 --target codex

Ejecutar después de confirmar el plan con dry-run.

Introduction

no-mistakes is a lightweight Go CLI that wraps git push with configurable safety checks. It prevents common mistakes like pushing to protected branches, pushing uncommitted changes, or force-pushing without confirmation, acting as a guardrail for teams and solo developers.

What no-mistakes Does

  • Intercepts git push and runs configurable pre-push validations
  • Blocks pushes to protected branches (main, master, production)
  • Requires confirmation for force pushes and branch deletions
  • Validates commit messages against configurable patterns
  • Checks for uncommitted changes and untracked sensitive files

Architecture Overview

no-mistakes installs as a git hook wrapper in Go. When a push is initiated, it intercepts the command, runs the configured validation chain, and either allows or blocks the operation with a clear error message. Configuration is stored in a project-level YAML file or global config, and the tool operates entirely locally with zero network dependency.

Self-Hosting & Configuration

  • Install via go install or download a pre-built binary
  • Run no-mistakes init in a repository to set up git hooks
  • Configure protected branches in .no-mistakes.yaml at the repo root
  • Global rules can be set in ~/.config/no-mistakes/config.yaml
  • Works alongside existing git hooks without conflicts

Key Features

  • Zero-dependency single binary written in Go
  • Protects against accidental pushes to sensitive branches
  • Configurable commit message validation patterns
  • Force-push confirmation with explicit acknowledgment
  • Sensitive file detection (prevents pushing .env, credentials)

Comparison with Similar Tools

  • Husky — JS git hooks manager; no-mistakes is language-agnostic and focused on push safety
  • pre-commit — general hook framework; no-mistakes is specialized for push protection
  • Lefthook — fast hook runner; no-mistakes adds branch protection and sensitive file detection
  • git-secrets — AWS secret scanning; no-mistakes covers broader push safety beyond secrets

FAQ

Q: Does it work with all git hosting platforms? A: Yes, it operates at the local git level and is platform-agnostic.

Q: Can I bypass the checks in an emergency? A: Yes, an explicit flag allows bypassing with a warning logged.

Q: Does it slow down normal pushes? A: Checks run in milliseconds; there is no noticeable delay for standard pushes.

Q: Can teams share configuration? A: Yes, commit .no-mistakes.yaml to the repository for shared team rules.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados