In version control using Git, when you encounter merge conflicts during a merge operation, which step must you take to resolve the conflicts and finalize the merge?
A) Delete all conflicting files and restart the merge process.
B) Edit all conflicting files to resolve the conflicts, then mark them as resolved using 'git add'.
C) Use 'git commit --amend' to automatically resolve all merge conflicts.
D) Revert to the previous commit and discard all changes.