Say you have a master and develop branches. Further more, say you workflow is like that:
- on developyou checkout a newfeaturebranch;
- work on it;
- check out developagain;
- merge the featurebranch with--no-ff.
This way you can nicely see which commits belong to which feature.
* Merge branch 'feature' into develop
|\
| * Commit 3
| * Commit 2
| * Commit 1
|/
* Some old commit
At some point you pull master and want to rebase develop on it. However, after the rebase git log displays all commits on develop in a linear way, without showing the feature branches and omitting the generic merge commits:
* Commit 3
* Commit 2
* Commit 1
* Some old commit
Why is that and how can I preserve them after a rebase?
 
    