Reputation: 10203
My group will start using Git soon and would like to maintain a concise history on master. I would like to start breaking up big changes into lots of smaller changes but they don't want to see that on the master branch. My thought is to confine my little changes to a topic branch and then merge with master but the problem is if my topic branch is based on HEAD then the merge will simply result in a fast forward, rather than a new commit with two parents. How can I encourage Git to always create a new commit with multiple parents? I looked at --squash and disabling --ff but didn't have much luck but maybe I'm misunderstanding the behavior.
Upvotes: 0
Views: 129
Reputation: 78653
git merge --no-ff
will always create a new merge commit, even if the merge is fast-forwardable.
Upvotes: 5