Should Your AI Coding Session Be Part of the Git Commit?
Source: Dev.to
Introduction
The rise of AI‑powered coding assistants has introduced a new question to our development workflow: if AI writes your code, should the conversation history be included in the commit?
Why Consider AI Sessions in Commits
At first glance, it sounds absurd. We don’t commit our Google searches or Stack Overflow browsing history. But AI‑assisted coding is fundamentally different. The prompt engineering, the back‑and‑forth refinement, the edge cases you discussed—these aren’t just research. They’re part of the design process.
When reviewing a pull request months later, it would be valuable to see why the developer chose a particular approach. With traditional code, we rely on commit messages and code comments. AI sessions often contain rich context—the constraints discussed, alternatives considered, and reasoning behind implementation choices.
Current Approaches
- Appending summaries – Some developers add AI session summaries to commit messages.
- Parallel documentation – Others maintain separate documentation of significant AI interactions.
Opponents argue this adds noise and that code should speak for itself.
Potential Solutions
- Selective preservation – Not every AI interaction deserves preservation, but pivotal architectural decisions made through AI collaboration might warrant documentation, similar to pair‑programming notes.
- New conventions – Possible ideas include a
.ai-sessions/directory, commit‑message footers, or IDE plugins that let you tag and archive significant interactions.
Conclusion
As AI becomes more integrated into our workflows, version‑control practices will need to evolve alongside our tools.
If you want to check out my blogging project, visit Pluma.ink – a clean platform for documenting ideas.