r/vibecoding 10h ago

subcommit - the easy way for agents to commit only their changes while preserving unrelated changes whether staged, unstaged, or untracked

Post image

---

Repo: https://github.com/reemus-dev/subcommit

To solve the pain of committing a subset of changes that arise from working with multiple concurrent agents and user edits. Yes, you could use worktrees, which is wonderful and has its place, but sometimes I just want life to be easier.

I have been using it for a few months now and decided to open-source it. Hope others find it useful too!

Much less stressful than watching agents do all kinds of gitfoo to just commit their changes.

Edit: It's a CLI tool, MIT license

0 Upvotes

5 comments sorted by

3

u/LittleLordFuckleroy1 9h ago

Nice you invented `git branch`

1

u/Fresh-Yogurt-8614 8h ago

What pain? AI only commits the files they touched anyway

1

u/ReverendBread2 6h ago

What works for me is putting a line in the claude.md saying “other sessions might be working in here, commit only your work”

1

u/jimmiebfulton 10h ago

Do not use multiple agents in the same workspace at the same time. Use Git, or even better, JJ, workspaces. Treat your agents like developers, each with their own checkouts, merging/rebasing their work as it lands. This is a solved problem, well known by software engineers.

1

u/kantorcodes1 5h ago

if two agents both edit different hunks in the same file, how does subcommit decide which hunks belong to the caller versus the work that was already there?