Find the conflicted files, edit each one into the version you want, then git add them and commit. A merge conflict only means both branches changed the same lines. Git stops, keeps both versions in the file, and waits for you to decide. Nothing is lost.
Run git status first. It lists the conflicted files under Unmerged paths. Open each one. Your side sits between <<<<<<< HEAD and =======. The incoming side follows, up to >>>>>>> branch-name.
Edit the file into the text you want, then delete all three marker lines. Often the right result keeps parts of both sides.
git status # which files are unmerged
git add src/config.js # staging a file marks it resolved
git commit # finishes the merge
git merge --abort # bail out, back to before the merge
There is no separate "resolve" command. git add is the signal. Run the build and tests before committing, because a file with no markers left can still be broken. If it goes wrong, git merge --abort before the commit puts everything back as it was.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
The diagram below the answer is the concept . Jump to it ↓