Reputation: 989
These are my steps.
Step 1: Merge develop
into feature
Step 2: Check if everything is OK and immediately afterwards merge feature
into develop
When I did that I got the following situation:
Only "merge develop
into feature
" is shown and "merge feature
into develop
" is not shown.
I would like that both merge commits are shown, like in the following picture.
Can someone tell me how can I achieve this?
Upvotes: 1
Views: 49
Reputation: 28869
If you do this fast enough, before anyone adds new commits to develop
, then by default Git will do a fast-forward merge. To prevent it, just add --no-ff
to your merge command back into develop
:
git fetch
git branch -d develop # to make sure you aren't using an out of date copy
git checkout develop
git merge feature --no-ff
Side note: many workflows recommend rebasing feature
onto develop
before the merge back into develop
, instead of merging develop
into feature
first.
Upvotes: 2