This is not a question to solve a problem, just to broaden my understanding of git.

I have a project that is basically a one-man effort, so it has just one branch on our gitlab server; on my development machine, I usually have a "generic" dev branch, and a quickfix branch when needed. I usually delete the quickfix branch after merging it on master, but I keep the dev branch active for longer periods, so there is a number of commits from dev to master as the project progresses.

When I merge dev on master, I usually use `--squash` to get rid of the irrelevant "development" commits; then the merge message I am proposed says, "squashed commit of the following", with a list of commits *since the common ancestor*, that is, the commit I created dev from, *rather than the previous commit I merged*. Of course I simply delete the default comment and write my own; yet, I am surprised that git does not realize that *a merge from dev to master creates a new common ancestor for the two branches*.

Again, not a problem: I can simply delete the dev branch and recreate it–actually, that's what I used to do before realizing that it was not necessary. Yet, I would like to understand *why* git does not consider a merge as a common ancestor for the branches. Maybe I am missing an option?

EDIT:

My merge strategy does the following:
[![image 1](https://i.stack.imgur.com/UI19j.png)](https://i.stack.imgur.com/UI19j.png)

Is there anyway to get the following, without deleting and recreating the dev branch?

[![enter image description here](https://i.stack.imgur.com/ebmWf.png)](https://i.stack.imgur.com/ebmWf.png)