Goal: Learn how to merge branches.
-
Merge
feature-branchintomain:- Make sure you are on the
mainbranch:git checkout main
- Merge the
feature-branchintomain:git merge feature-branch
- Make sure you are on the
-
Resolve Merge Conflicts (if any):
- If there are any conflicts, resolve them manually by editing the conflicting files.
- Add and commit the resolved files:
git add <file> git commit -m "Resolved merge conflicts"