● is the merge commit from bring your branch in to master. To get rid of this commit can be complicated depending on a couple of factors. You will need to rebase the commits from origin/feature
and replace them for ● on origin/master
. One thing with this is that you are changing history and if there are others pulling changes from origin
this will cause a lot of problems as you will need to force push the changes to origin
(not recommended unless you are the only one accessing the remote branch).
This can also be difficult depending on the number of commits after ●.
If you want to do this you will need to find the commit where origin/feature
diverted from origin/master
. Since the branch is deleted you will need to look through the graph. When you find this commit, note the hash. And run git rebase -i <sha of the diverging commit.
This should give you a list of all the commits, that happened since then. You should be able to rearrange them which would remove your problem commit.
Doing these steps can cause alot of repetitive fixing of conflicts when git is reapplying the commits from origin/feature
. It also will cause them to change, you will be the committer of these changes and iirc will also change the date of the commit.
I wouldn't recommend doing this for this commit. But to prevent it from happening, when you want to bring in a feature branch in the future. Do git rebase -i <feature branch>
on master instead of git merge
. This will prevent the new commit from being created.