'How to achive a gitlab graph during merge where the feature branch diverges from the parent, get one commit and merges back to parent as shown below

Below is the gitlab graph which shows 2 sceneraios 1 and 2. When I make one commit in feature branch and merge back to the parent, I see both parent and feature branch are in same like as in sceneraio 1.

git lab graph

I want to merge as seen in sceneraio 2 where the feature clealy diverges, gets a commit and merges back to the parent.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source