Agents Make Rebase a No-Brainer
I love small, atomic, working commits . I love linear history . I don’t love it when I research file history, and it leads me to a big, hard-to-review, non-descriptive merge commit.
The most significant downside of the rebase strategy is the sheer effort it takes to check every rebased commit and get it to a working state. Resolving a conflict several times and running the tests several times is simply more work than doing it once for the final state of the branch.
At least, it was.
Nowadays, I ask an agent to rebase branches for me, and I enjoy the results immensely. You should try it!
This post would look more “serious” if I shared some detailed and specific workflow. But the truth is, I just prompt an agent like this, and it figures out the rest:
Rebase the current branch (
foo) ontomastercommit-by-commit, making sure each passes the tests. Stop and ask me if you encounter truly semantically conflicting edits where I need to make a decision.
This is magic. There’s not much I can write about.
I still review the rebased commits manually to make sure that an LLM didn’t cheat or do something stupid in the tests. It hasn’t so far, and this review is quick. This scheme is obviously worth it to me.
At the moment, I use VS Code + GitHub Copilot + GPT-5.6 Sol. The specifics are useful to mention when discussing capabilities of agents.
Comments