git-merge-rebase
- https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging
- https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_advanced_merging
- https://git-scm.com/book/en/v2/Git-Branching-Rebasing
Merge 是起初两条 branches 后来合并为一条,与此同时保留被合并的分支;
Rebase 则是合并后不保留被合并的分支。
第 2 个链接中的例子还没有完全理解。
> Do not rebase commits that exist outside your repository and that people may have based work on. > > If you only ever rebase commits that have never left your own computer, you'll be just fine. If you rebase commits that have been pushed, but that no one else has based commits from, you'll also be fine. If you rebase commits that have already been pushed publicly, and people may have based work on those commits, then you may be in for some frustrating trouble, and the scorn of your teammates.