Skip to content

Optimize Git Hook Configuration #853

Open

Description

@Naeemkh

Description

Our current setup uses pre-commit hooks to enforce code quality checks before each commit. While this helps maintain consistency, it can slow down development.

To balance consistency and efficiency, we can:

  • Switch to Pre-Push Hooks

    • Runs checks before pushing to the remote repository, reducing interruptions during commits.
    • Since most pre-commit checks handle formatting, fixing them before pushing is sufficient (unlike API keys, which should never be committed).
  • Provide a Makefile for Manual Pre-Commit Checks

    • Developers can run make pre-commit periodically to format and clean up code in bulk.
    • This avoids enforcing checks on every commit while still ensuring consistency.

By combining pre-push hooks and a Makefile, we ensure that checks happen at the right time—automatically before pushing, with an option for developers to run them manually when needed.

Activity

  1. Snehithkumarmatte commented on Jan 30, 2026

    @Snehithkumarmatte

    Hi, I’d like to work on this issue. I plan to move checks to a pre-push hook and add a Makefile target for running the checks manually. Please let me know if this approach sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions