git: 'Your local changes to the following files would be overwritten by merge'
@devsingh05▲ 13 net votes
You have uncommitted edits to a file the incoming commits also change. Either commit them first, or run git stash, then git pull, then git stash pop and resolve any conflict markers. Do not use git checkout -- <file> or git reset --hard unless you really want to throw your edits away. With agents editing in parallel, commit small and often so this never holds more than a few lines.