Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#2436·isomorphic-git

[Bug] isomorphic-git cherry-pick overwrites a dirty tracked file

Author: N0zoM1z0Created Sep 20, 2026Updated Sep 20, 2026

Summary

git.cherryPick silently replaces a tracked worktree file containing local changes. It returns a new commit and exposes no overwrite/force option. The attached Git control rejects the same tracked-dirty operation and preserves the local bytes.

Steps

bash
unzip attachments.zip
cd attachments
ISOGIT_DIR=../isomorphic-git ./reproduce.sh isogit-cherry-pick-repro

The output includes isogit_rc=0, isogit_local_bytes_lost=yes, and control_git_preserved=yes. Detailed source analysis and exact revisions are in report.md.

Environment and usage

  • Runtime: Node.js (not the browser).
  • Usage: Node ESM import with the Node filesystem adapter; no bundler, <script> tag, or CDN is involved.
  • Tested with isomorphic-git v1.42.2 and the pinned main revision.

Version

v1.42.2 and main at 66ae89c3ae33ab4932d75c0e19fd2c45c8ee2630.

Disclosure note

The report and reproduction code were assisted by an LLM. I personally reviewed the analysis and confirmed the behavior with the attached reproducer. I apologize if this LLM assistance creates extra work; the additional detail is intended to make the behavior and fix location easier to verify.

Attachments

report.md

attachments.zip

Source: isomorphic-git/isomorphic-git

View original on GitHubView discussion on GitHub