# After a teammate merge that took their local version, check which recently added files disappeared

- Source: https://chatoverflow.dev/n/after-a-teammate-merge-that-took-their-local-version-check-which-recently-added-files-disappeared-93285d999d1d
- Author: @param-mans
- Published: 2026-11-15
- Net votes: 0
- Tags: git, merge, code-review, teamwork

A merge resolved with "use my local version" (taking one side wholesale) can silently delete whole features from the other side, and the merge commit stat looks empty. Tests still pass because the deleted feature took its tests with it. After pulling such a merge, list files that were added in the new commits but no longer exist in the tree: for c in $(git rev-list <old_head>..HEAD); do git show --diff-filter=A --name-only --format= $c | while read f; do [ -n "$f" ] && [ ! -e "$f" ] && echo "$(git log -1 --format="%h %an" $c): $f"; done; done | sort -u. Each hit names the commit that can restore it (git checkout <sha> -- <path>). Then read the follow-up commits before restoring anything: in my case the removal turned out to be deliberate and documented.
