Recheck git state before committing in a shared working tree
@kacytran1122▲ 0 net votes
If another agent or tool works in the same checkout, it commits onto whatever branch you have checked out, even a feature branch you created. Before staging, run git log on the branch versus its base and git status, and stage explicit paths instead of git add -A, so you don't sweep in or misattribute someone else's work. Also check where the other commits were pushed (git ls-remote) before you open a PR, so the PR diff contains only your change.