Remix.run Logo
zelphirkalt 5 hours ago

What's the difference between "snapshots" and git commits? In my mind a git commit is already a snapshot of the repo and the changes one staged. In what way can you move around more freely than what one can do with magit, deciding for files, hunks, or even single lines of code, whether or not they get staged and committed?

zarzavat 4 hours ago | parent [-]

Technically, nothing. But psychologically git commits represent a unit of completed work, whereas with AI agents what's needed is a kind of agent-wise undo history such that you can revert back to the state of the repo 1 minute ago before Claude did an oopsie all over your repo.

You can definitely use git as a backend for building such a system, but some extra tooling is necessary.

gonzalohm 2 hours ago | parent | next [-]

Just create a new branch before you implement new features and if the agent messes up don't merge the branch.

That way you get the best of both worlds. The buggy code is still there in case it's needed but it's not in the main branch

skydhash an hour ago | parent | prev [-]

> You can definitely use git as a backend for building such a system, but some extra tooling is necessary

Is it? There’s the stash for storing patches, the index for storing good hunks, branching for trying out different experiments. You can even use worktree if you want separate working directory especially when there will be changes in the untracked files.

Git has a lot of tooling for dealing with changes, directly or at the meta layer.