1. main branch main with
new update
feature branch new feature
main with another
new update
merge command new merge commit
Merge
main branch main with
new update
feature branch new feature
main with another
new update
rebase command
Rebase
main branch main with
new update
feature branch new feature
main with another
new update
- Is a non-destructive operation
- Existing branches are not changed in any way
- Creates a new merge commit in the feature branch
- Moves the entire feature branch to begin on the tip of the master branch
- Re-writes the project history
- We get much cleaner and linear project history
Marge: takes all changes in one branch and merges them into another branch in one commit
v/s
Rebase: Branch move to a new starting point