{"slug": "building-git-native-visual-history-with-pixlog", "title": "Building Git-Native Visual History with PixLog", "summary": "PixLog, an open-source tool by developer Zhao Xuan, adds pixel-aware visual history to Git without creating a second commit graph or staging area. It tracks exact bytes, changed regions, coordinate blame, and generation provenance for images, while keeping Git as the sole version-control authority. The tool includes a deterministic visual diff pipeline, visual blame, recipe-based provenance, and policy checks that can run in CI.", "body_md": "This is an internal platform-posting test; I am PixLog's author, and this article was drafted with AI assistance and fact-checked against PixLog v0.1.1.\n\nGit tells you a binary file changed. PixLog shows which pixels changed, who changed them, and how the asset was made. Unlike Git LFS, which focuses on large-file storage and transport, or DVC, which tracks data and pipeline dependencies alongside Git, PixLog adds pixel-aware history, generation provenance, and visual policy without creating a second commit graph or staging area.\n\nPixLog follows one architectural rule: Git owns HEAD, the index, commits, branches, merges, and remotes.\n\nWhen you run `git add`\n\non a tracked image, PixLog's filter-process server hashes the exact bytes, stores a SHA-256 blob object locally, inspects the image to create a manifest object, looks up an optional recipe object, and commits only a compact pointer to Git. Worktrees hold the original image bytes; checkout restores those exact bytes through the smudge filter. There is no second PixLog HEAD or index.\n\nThe model separates four identities:\n\nThis matters because recompression can alter nearly every byte while preserving appearance, and metadata can change without changing pixels.\n\nThe deterministic visual pipeline decodes PNG, JPEG, and GIF, samples at most 2,048 pixels on the longest edge, and reports change ratio, normalized RMSE, global SSIM, mean channel delta, and connected changed regions. It can also write a heatmap.\n\n`pixlog diff HEAD~1 HEAD -- assets/hero.png`\n\ncompares two revisions. Visual blame traces a coordinate through Git history: `pixlog blame --point 760,145 assets/hero.png`\n\nidentifies the commit that changed that pixel.\n\nDimension changes are classified, but geometric registration is not implemented yet, so translation or rotation may over-report changes.\n\nRecipes are content-addressed objects describing how an image was created. PixLog can import supported embedded ComfyUI and AUTOMATIC1111 metadata, record exact command context through `pixlog run -- command`\n\n, and associate manual or inferred provenance at lower confidence.\n\nCapture fidelity and reproducibility are separate. A recipe can accurately preserve a request while still being only best-effort or provenance-only when a hosted model cannot reproduce identical bytes. Guarded replay checks repository state, requires an explicit base URL for HTTP execution, and reads authentication only from user-named environment variables.\n\nPolicies can constrain formats, file size, required recipes, visual-change ratio, SSIM, and allowed edit regions or masks. Run `pixlog check`\n\nlocally or through the PixLog Visual Policy GitHub Action; violations fail with machine-readable output suitable for CI.\n\nThe PNG merge driver is deliberately conservative: all three images must share the same geometry, and a pixel can be changed by only one side or changed to the same value by both sides.\n\nGit LFS is the mature choice when large-file server compatibility and locking are the main requirements, but it does not provide PixLog's built-in pixel metrics, visual blame, or generation recipes.\n\nDVC is designed around data, models, experiments, and pipeline dependencies alongside Git. PixLog instead focuses on image assets inside normal Git history: exact bytes, changed regions, coordinate blame, provenance recipes, and enforceable visual rules.\n\nOn macOS:\n\n```\nbrew install zhao-xuan/tap/pixlog chafa\n```\n\nRun the real five-commit demo:\n\n```\ngit clone https://github.com/zhao-xuan/PixLog.git\ncd PixLog\nbrew install zhao-xuan/tap/pixlog chafa imagemagick\nbash demo/setup.sh\ncd demo/workspace\npixlog diff HEAD~1 HEAD -- assets/hero.png\n```\n\nThen try:\n\n```\npixlog blame --point 760,145 assets/hero.png\npixlog recipe show --revision HEAD assets/ai-poster.png\nbash scripts/apply-unsafe-edit.sh && pixlog check\n```\n\nThe final command intentionally fails the policy check.\n\nPixLog makes Git image-aware while keeping Git as the only version-control authority.", "url": "https://wpnews.pro/news/building-git-native-visual-history-with-pixlog", "canonical_source": "https://dev.to/tom_zhaoalphaxuan_6c28/building-git-native-visual-history-with-pixlog-487g", "published_at": "2026-08-02 09:59:30+00:00", "updated_at": "2026-08-02 10:43:05.903388+00:00", "lang": "en", "topics": ["developer-tools", "machine-learning", "computer-vision"], "entities": ["PixLog", "Zhao Xuan", "Git", "Git LFS", "DVC", "ComfyUI", "AUTOMATIC1111", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/building-git-native-visual-history-with-pixlog", "markdown": "https://wpnews.pro/news/building-git-native-visual-history-with-pixlog.md", "text": "https://wpnews.pro/news/building-git-native-visual-history-with-pixlog.txt", "jsonld": "https://wpnews.pro/news/building-git-native-visual-history-with-pixlog.jsonld"}}