Git Governance & Release Operations
This skill covers the workflows and tools used to enforce repo conventions, configure pre-commit hooks, perform safe validation before staging commits, resolve merge conflicts, and manage backups.
When to Use
Use this skill when installing pre-commit hooks, preparing code for commits, running merge conflict resolutions, or creating backups before major changes.
Prerequisites
- Conda environment initialized.
- Git CLI installed and workspace configured.
Process
Follow these procedures to commit code securely and manage repositories.
Installing pre-commit hooks
Set up local hooks to block invalid commits:
conda run -p D:\Anaconda\envs\cursor-factory python scripts/git/install_hooks.py
Performing safe commits
Verify rules compliance and commit changes in a single gated step:
conda run -p D:\Anaconda\envs\cursor-factory python scripts/git/verify_and_commit.py -m "Your commit message"
Best Practices
- Verify before Staging: Always run pre-commit checks locally before pushing changes.
- Never bypass hooks: Bypass checks only when explicitly asked by the system architect.