You want to keep your edits
CommonThe local change matters. Either commit it so the pull merges both, or shelve it around the pull.
Confirm
git status --short git diff --stat
M next to the file named in the error
Fix
- Commit, then pull: git add FILE, git commit -m "…", git pull. Resolve any conflict the merge reports.
- Or stash around the pull: git stash, git pull, git stash pop. If the pop conflicts, fix the markers in the file; the stash is kept until you git stash drop it.
- Or in one step: git pull --autostash, then check git status for UU files, because it exits 0 even when re-applying conflicts.
git stash && git pull && git stash pop
Reproduced on Git 2.50.1; a conflict on pop keeps the stash, so nothing is lost.