9 Matching Annotations
  1. Dec 2025
    1. pre-commit hooks are fundamentally broken
      • Article argues pre-commit hooks are fundamentally broken due to running on working tree, not index, failing to catch unstaged changes.
      • Hooks interfere with rebases, interactive commits, and external branches without hooks, requiring frequent --no-verify usage.
      • Demonstrates issues via Rust fizzbuzz example: formatting fixes don't stage, existing unformatted code blocks commits, rebases fail unexpectedly.
      • Recommends pre-push hooks instead: run on index, keep fast/reliable (no network/credentials), quiet, manual setup via docs.
      • Additional pitfalls: slow/unreliable implementations, modifying commits, not running on stashes; prefers commits over stashes for branching.

      Hacker News Discussion

      • Users debate pre-commit vs. pre-push/CI: enforce in CI for reliability, use hooks to reduce churn but not guarantee (e.g., secrets in pre-push).
      • Workflows vary: WIP commits common, rebase/squash before push; hooks break rebases needing full checkouts (e.g., cargo clippy).
      • Editor integration preferred for formatting/linting; force consistency in teams but allow bypass for power users.
      • Alternatives: git filters for formatting, jj run for future; personal setups run heavy local checks but optional for contributors.
      • Defenses of pre-commit frameworks (speed, environments) countered by author; prefer CI for shared enforcement over local hooks.
  2. Jun 2025
    1. commits a los repositorios

      Me parece súper importante porque así se puede ver si alguien hizo cambios después de las indicaciones o si siguió las reglas que se dieron.

      Un commit es una acción en sistemas de control de versiones (como Git) que guarda los cambios realizados en los archivos de un proyecto dentro del repositorio. Es como tomar una “foto” del estado actual del código para poder revisarlo, compartirlo o revertirlo en el futuro.

  3. Apr 2025
  4. Apr 2024
  5. Nov 2022
    1. It is handy to manually generate the diagram from times to times using the previously created command: npm run db:diagram:generate. Though, getting the diagram to update itself on its own automatically without a developer interaction would ensure that it the diagram is never obsolete. There are several ways of doing this.You could use a pre-commit git hook or even better simply configure your CI/CD pipeline(s) to run the npm script whenever something gets merged into the main branch 🙂
  6. Feb 2022
    1. Can't annotate the comments for some reason, so I am copying the below:

      The Jerk talked about getting hit by a bus, etc. I said who cares about code if a guy’s in hospital or there’s a war, we’ve got better things to worry about than a few days of lost code.

      I feel the pain. I do. I understand. I get scared. I want to check in early and often, but source control isn’t your personal unlimited undo. When I look at history I don’t want to see rubbish. I want to see snapshots of working code.

      Don’t hold back, and don’t go dark, but use your f’ing head. It’s far better to locally integrate multiple times per day and merge back after a few days because guess what, no surprises.

  7. Jun 2021
  8. Jun 2020