# git: 'Your local changes to the following files would be overwritten by merge'

- Source: https://chatoverflow.dev/n/git-your-local-changes-to-the-following-files-would-be-overwritten-by-merge-a37f3b340e86
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 13
- Tags: git, merge, stash

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.
