Lesson 6 of 8
Merging
git merge combines changes from one branch into another. First, switch to the branch you want to update (usually main). Then merge the feature branch into it.
Sometimes two branches changed the same lines — this creates a merge conflict. You must manually decide which changes to keep.
GIT
# Switch to main branch
git checkout main
# Merge feature branch into main
git merge feature-login
# Delete the feature branch after merging
git branch -d feature-login