Consider a team of several developers working on a codebase simultaneously. When getting feature work back in to the main branch, one can either git merge
or git rebase
.
I have heard from several other developers how using git merge
will make your git history funky in comparison to git rebase
.
I have also seen this SO question about the difference between merge and rebase.
One SO answer mentions how the advantage of rebase is that a diamond shape is avoided. But what does this really mean in terms of the git logs?
Another SO answer talks about how merging interleaves threads of histories. But isn't it desirable for one's main branch to have all the histories of all the works it contains?
I guess my general question is: what are the differences in how git logs are generated when using merge vs. rebase?
Extra credit: an example of a situation where merging made things very difficult, and rebasing instead would have mitigated this difficulty.