pre-commit icon
pre-commit icon

pre-commit

Git hook scripts are useful for identifying simple issues before submission to code review. We run our hooks on every commit to automatically point out issues in code such as missing semicolons, trailing whitespace, and debug statements.

pre-commit screenshot 1

Cost / License

  • Free
  • Open Source

Platforms

  • Mac
  • Windows
  • Linux
  • BSD
-
No reviews
0likes
0comments
0news articles

Features

Suggest and vote on features
  1. Git icon  Git Support
  2.  Refactoring

 Tags

pre-commit News & Activities

Highlights All activities

Recent activities

No activities found.

pre-commit information

  • Developed by

    US flagpre-commit
  • Licensing

    Open Source (MIT) and Free product.
  • Written in

  • Alternatives

    3 alternatives listed
  • Supported Languages

    • English

AlternativeTo Category

Development

GitHub repository

  •  14,548 Stars
  •  906 Forks
  •  30 Open Issues
  •   Updated  
View on GitHub
pre-commit was added to AlternativeTo by Sorin Sbarnea on and this page was last updated .
No comments or reviews, maybe you want to be first?
Post comment/review

What is pre-commit?

Git hook scripts are useful for identifying simple issues before submission to code review. We run our hooks on every commit to automatically point out issues in code such as missing semicolons, trailing whitespace, and debug statements. By pointing these issues out before code review, this allows a code reviewer to focus on the architecture of a change while not wasting time with trivial style nitpicks.

As we created more libraries and projects we recognized that sharing our pre-commit hooks across projects is painful. We copied and pasted unwieldy bash scripts from project to project and had to manually change the hooks to work for different project structures.

We believe that you should always use the best industry standard linters. Some of the best linters are written in languages that you do not use in your project or have installed on your machine. For example scss-lint is a linter for SCSS written in Ruby. If you’re writing a project in node you should be able to use scss-lint as a pre-commit hook without adding a Gemfile to your project or understanding how to get scss-lint installed.

We built pre-commit to solve our hook issues. It is a multi-language package manager for pre-commit hooks. You specify a list of hooks you want and pre-commit manages the installation and execution of any hook written in any language before every commit. pre-commit is specifically designed to not require root access. If one of your developers doesn’t have node installed but modifies a JavaScript file, pre-commit automatically handles downloading and building node to run eslint without root.

Official Links