Closed NoamNol closed 1 month ago
Merge: Merging is the process of combining code from two different branches. When you merge one branch into another, Git creates a new commit that combines the changes from both branches. This is the most common way of integrating changes in Git. Here's an example:
git checkout branchA #switch to branchA git merge branchB #merge branchB into branchA
Rebase: Rebasing is another way of integrating changes from one branch to another. Instead of creating a new commit, rebasing moves the entire branch to a new base commit.
git checkout branchA #switch to branchA git rebase branchB #rebase branchA onto branchB
https://github.com/Ebazhanov/linkedin-skill-assessments-quizzes/blob/6775b0efbb4fb9a0e137a224c49ad614630fab5c/git/git-quiz.md?plain=1#L446-L448