ghost-commit is a CLI for committing alternate file contents without rewriting the actual files in your working tree.
It lets you commit intermediate files produced by an LLM, or files that do not exist in your working tree yet, as content at the paths you choose.
Install with Homebrew:
brew tap s4na/ghost-commit https://github.com/s4na/ghost-commit
brew install --HEAD ghost-commitCommit another file's contents as README.md.
ghost-commit -m "Update README" --file README.md=/tmp/llm-readme.mdCommit content from stdin as a new file.
cat /tmp/generated-config.yml | ghost-commit -m "Add config" --file config.yml=-Commit a state where a file does not exist.
ghost-commit -m "Remove old config" --delete old-config.ymlghost-commit commits only the virtual files you specify. It does not rewrite your working files or alter unrelated staged changes.
After a ghost commit, git status may show differences if your working files differ from the new commit. That happens because the commit changed, not because ghost-commit rewrote those files.
go build -o ghost-commit .
./ghost-commit --help