Clean master branch but also detailed record of intermediary commits
问题 Goal : keep a clean history of master, whilst also keeping the intermediary commits. For instance , let's start with a master branch: M1 --- M2 --- M3 ^ master I work on a feature/bug/whatever on a new branch: M1 --- M2 --- M3 ^ \ | \- F1 --- F2 -- F3 | ^ master feature And when I merge into master, I want M3 to be the parent, but also keep the "iterations" you took to reach from M3 to the new commit. This can be done with merge --no-ff : M1 --- M2 --- M3 ----------------------- M4 \ / ^ \-