Overview
Use rebase when:
- The branch is local or personal.
- You want the branch to begin from the latest main state.
- A linear history is preferred.
- Rewriting the branch's commit IDs will not disrupt collaborators.
Avoid rebasing shared public history when:
- Multiple developers are working from the same branch.
- The commits already exist on a shared remote branch.
- Other local copies depend on the existing commit IDs.
If rebase must be used in a collaborative setting, the team should be informed before the history is rewritten.