git rebase?!
Last updated
Last updated
https://hackernoon.com/git-merge-vs-rebase-whats-the-diff-76413c117333
In summary, when looking to incorporate changes from one Git branch into another:
Use merge in cases where you want a set of commits to be clearly grouped together in history
Use rebase when you want to keep a linear commit history
DON'T use rebase on a public /shared branch
By merging feature into master, master obtains a new commit -- a "merge commit".
re-base
Before we continue working on our feature branch, we decide we want to bring in the latest changes from master to keep things fresh.
Rather that merging master's new commits into feature, we opt to rebase our feature branch onto master.
At a high level, rebasing can be understood as "moving the base of a branch onto a different position". Think of it like a redo--"I meant to start here."