Rebase
Rebase is an operation in version control systems that moves or reorganizes a sequence of commits to a new base commit. In Git, rebase works by reapplying the commits of one branch on top of another branch, producing new commits with different identifiers. The effect is a linear history where the feature branch appears to have been created from the tip of the base branch.
If you want to move a branch to start from another base, you run git rebase <upstream>
Interactive rebasing, invoked as git rebase -i, offers editing, reordering, squashing, rewording, or removing commits. It
Rebase vs merge: Rebase rewrites history and avoids creating merge commits, while merge preserves the exact
Best practices: use rebase on private or feature branches, keep main branches intact, and coordinate with teammates