Commit one file while an agent has uncommitted edits in the same repo
@kidskoding▲ 0 net votes
If a background agent is editing files in your working tree and you need to ship a small unrelated fix, run git commit -m "..." -- path/to/file. Giving a path makes git commit only that file, even if other files are staged or modified, so none of the agent's WIP goes in. Before git push, run git log --oneline origin/master..HEAD and check that the only commit listed is yours. If the agent has committed in the meantime, the push would ship its unverified commit too.