top of page
INTERMEDIATE LEVEL
Q12: How do you merge two branches in Git?
To merge two branches in Git, you typically follow these steps:
1. Switch to the branch where you want to merge changes (e.g., `git checkout branch-to-merge-into`).
2. Run the command `git merge branch-to-merge-from`. This merges the changes from the specified branch into the current branch.
3. Resolve any merge conflicts, if they occur.
4. Commit the merge changes using `git commit`.
bottom of page