Home / use case

GitSéance: local Gemma 2B explains deleted code from git history and refuses to guess

At a glance
Models & engines
gemma2:2b in Ollama on localhost:11434, temperature 0.25
Key gotcha
Small models invent reasons for removals when the commit message gives them nothing to go on, so screen vague commits before inference.

What they built

GitSéance is a developer archaeology tool themed as a Día de los Muertos ofrenda. git blame only covers lines that survived, so the reasoning behind deleted code stays buried in git log -p where nobody looks; GitSéance digs it out and lets a local model speak for each removed function.

When the author first fed deleted diffs to a local 2B model and asked why a function was removed, it recited a good answer for informative commits but invented elaborate backstories for commits that just said wip or cleanup. He decided a fictional story is worse than silence and built guardrails around the model.

It runs as a Python CLI, a single-page web app and a GitHub Actions workflow that comments on pull requests that delete code. Since teams won't upload internal git logs to cloud APIs, the model runs locally through Ollama.

Setup

  • gemma2:2b in Ollama on localhost:11434, temperature 0.25
  • A Python CLI using git plumbing and the standard library
  • Optional Sentry tracing and a GitHub Actions workflow for pull requests
  • Code on GitHub (FranciscoGrandon/git-seance) with 41 automated tests

How it works

  1. A single streaming pass over git log -p -U0 reconstructs author, timestamp, commit SHA and deleted lines, which he reports takes under 120 ms.
  2. A symbol extractor finds the deleted functions in several languages.
  3. Before calling the model, commit messages are checked against low-signal patterns such as wip, temp, cleanup and fix; if one matches, the model is skipped and an honest fallback epitaph is shown.
  4. After generation, a regex check confirms the reply includes the real 7-character commit SHA and the file path; if not, verified deterministic text replaces it.

Results & numbers

  • The pull request workflow posts a table of each deleted symbol, its file, commit SHA, author and date, and whether the epitaph was grounded or blocked as a cryptic commit.
  • The author reports 41 passing tests.

Gotchas

  • Small models invent reasons for removals when the commit message gives them nothing to go on, so screen vague commits before inference.
  • Grounding is checked only by the presence of the SHA and file path in the reply, not by deeper fact-checking.
“In software archaeology, a fictional story is worse than silence.”— Francisco Grandón

Do it yourself

  1. Install Ollama and run ollama pull gemma2:2b.
  2. Clone FranciscoGrandon/git-seance from GitHub.
  3. Run python git_seance.py inside any git repository.
  4. Read the epitaphs for deleted functions; vague commits get an honest fallback instead of a story.
  5. Optionally add the included GitHub Actions workflow to comment on pull requests that remove code.
git clone https://github.com/FranciscoGrandon/git-seance.git
cd git-seance
ollama pull gemma2:2b
python git_seance.py
Source: Francisco Grandón (DEV Community) · Published 2026-10-28 · Added 2026-10-28. This write-up summarizes the original source; see it for full details.

Similar setups

rip: a local Gemma 2 2B writes epitaphs and revival ideas for your abandoned side projects

A Hacktoberfest CLI scans your folders for dormant projects and has Gemma 2 2B on Ollama write a witty obituary and a suggestion to revive each one, sending only metadata, never code.

razorbill (DEV Community) · 2026-11-03

PatchPal TinyAgent: a coding agent on a 4B model and a 6GB laptop GPU

WiseProbe adapted its PatchPal coding agent to run Gemma 4 E4B or Qwen3.5 4B through Ollama on a 6GB RTX A1000, using handoff-note compaction and capped file reads to work inside a 16K or 32K window.

WiseProbe Blog · 2026-11-25

Local AI: a one-click Windows app that picks a model for your PC and sets up Ollama for friends

Tired of setting up local LLMs for friends, a developer built a free MIT-licensed Windows app that detects your GPU and RAM, installs Ollama without admin rights, pulls a fitting model and opens a private chat.

Oleg Che (DEV Community) · 2026-11-04

Link Séance: a local Gemma 3 writes grounded epitaphs for the dead links in your bookmarks

Abdul AmberNeel built a command-line tool that checks every link in a bookmarks file, finds the last living Wayback Machine snapshot of dead ones, and has a local Gemma 3 write a two-sentence epitaph only from what the archive kept.

Abdul AmberNeel (DEV Community) · 2026-10-31