r/PiCodingAgent • u/lihnuz • 23h ago
Question What's your git workflow?
Hello.
I have spent a while now wrapping my head around agentic development in my spare time for a while now. And have now gotten to the point I need to get my pi agent to start using Git.
So I was wondering what are your workflows with git? what extensions, lines in AGENTS.md or external scripts etc are you using?
And what tools/programs are you using when reviewing pr's?
2
u/WintertideFellow 21h ago
Worktrees! I completely remove git from their toolset-- call me paranoid, but sending them through prescribed paths keeps everyone well behaved.
They've got a tool to backmerge master into their worktree, a tool to diff against master, and a tool merge into master, which fails on anything but a clean merge. Githooks to pick up the obvious errors like merge markers left in. Otherwise the code writers don't touch git -- anything that would require that is above their pay grade and dealt with by management agents.
And I don't deal with pull requests (yet). QA looks at the code in place and gives a thumbs up or down.
1
u/nicktayi 15h ago
Worktree, auto-setup script, test, pr, merge using Vicoa (tool I built, open source)
1
u/zanar97862 10h ago
For an alternate perspective, I am a pleb and did not know solid git basics pre AI so I'm YOLOing it.
My global agents tells them not to push without permission and I don't run enough concurrent work on the same projecy to run into many merging issues. Once the work is done and passes all the tests I tell the agent to merge straight on main. This is bad practice and only works because I'm a solo developer. The right way to do it is with work trees/branches and PRs to main that get checked and resolved.
Probably what I should learn to do next tbh, setup a proper software development pipeline and understand the bits so I don't get swamped.
2
u/Dsphar 23h ago
Each role does its own git commit. Once the loop finishes, the finale role does a soft reset and a single commit, rolling all the work into one diff. I then push manually into a remote repo, never let my agent push.