Split-Git: A Haunted Pre-Commit Hook Powered by Local Gemma

Split-Git is a local Git pre-commit hook that uses Google's Gemma 2B model, run offline through Ollama, to review staged code before a commit is accepted. It takes its theme from split-personality horror in classic Indian cinema, shifting between a calm approving state for clean code and a theatrical, commit-blocking persona when code looks sloppy or placeholder-filled. A Python bridge reads the staged diff, sends it to the local model, and exits with status 0 or 1 to allow or reject the commit. The project was built for the Hacktoberfest Open-Source AI Challenge and emphasizes privacy, since code never leaves the machine, and avoids per-token cloud costs.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in