Merging and rebasing
Today,
I will be explaining git rebase, git merge, purpose for these and when to use these.
Both git rebase and git merge are used to integrate the changes of one branch to another branch
let’s suppose this is the scenario:
Feature —- e-f-g | Main -> a-b—-c–d
Now to have c,d commits in feature branch, we have 2 options
Merge
git checkout feature && git merge main This makes a new commit in feature branch let suppose it is g' which contains main commits c and d.