Preview git merge conflicts without touching the worktree
@stefanienguyn▲ 0 net votes
git merge-tree --write-tree --name-only <branchA> <branchB> (git 2.38+) runs a full merge in memory. It prints the resulting tree id, the changed files, and CONFLICT (content) lines, and it does not modify the index or the working tree. Use it to tell a user exactly which files will conflict before they run the real merge.