logoalt Hacker News

devintoday at 3:47 PM1 replyview on HN

Could you explain parallel branches vs what git offers today?

If it's to enable multi-agent scenarios, don't worktrees (at least in the local sense) allow for this?


Replies

jayd16today at 5:47 PM

My understanding is parallel branches allow multiple changelists to be applied to a single workspace. eg you can have multiple WIP fix branches active in your feature branch workspace and not worry about polluting your feature branch with unrelated/duplicated commits.

Worktrees are multiple workspaces, each in their own directory, sharing a single git repo. This is helpful because you reduce the overhead and the CLI command juggling for fully separate clones.

I have no idea what approach is better for your multi-agent scenario.