Zsh Plugin: Git Pre-commit

Today

Description

Provides aliases for pre-commit hook management, enabling automated code quality checks before commits.

Essential Commands

Advanced Commands

Installation and Setup

Hook Management

Usage Examples

# Setup
pre-commit install
 
# Run on all files
prcra
 
# Update hook versions
prcau
 
# Run on specific files
prcrf file1.py file2.py
 
# Configuration example (.pre-commit-config.yaml)
repos:
-   repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.4.0
    hooks:
    -   id: trailing-whitespace
    -   id: end-of-file-fixer
    -   id: check-yaml