Merging combines changes from one branch into another — typically bringing a completed feature branch back into the main branch. Git handles most merges automatically, but understanding merge types and conflicts is important.
Basic merge
git switch main # be on the branch you want to merge INTO
git merge feature-x # merge feature-x's changes into main
You switch to the branch (the one receiving changes) and merge the branch into it.
