merge
To merge is to take the changes from one branch and weave them into another, so two separate lines of work become one. You did some work off on your own branch; merging is the moment you bring it home into main, and the project's history now includes both stories.
Most of the time git does this for you, quietly and correctly. It looks at what changed on each side and stitches the two sets of edits together — even when both branches touched the same file, as long as they touched different parts of it. You run one command and the two histories are joined.
When git can't be sure how to combine two edits — because both branches changed the very same lines — it stops and asks you to decide. That's a merge conflict, and it's not an error so much as git politely refusing to guess. You pick what's right, and the merge completes.
$ git switch main $ git merge fix-login Updating 9f2a1c3..4b7e2a1 Fast-forward 1 file changed, 12 insertions(+)
Stand on main, then merge fix-login into it — git folds the branch's commits in.
You merge INTO the branch you're standing on — so switch to main first, then merge the feature branch in, not the other way round.