In a project using git, We have been working on the `develop` branch, and the main branch is meant to just carry the stable versions. The way we work is when we have achieved a stable version on `develop`, we tag it with a release name, and (theoretically) merge it in the main. However this last step was forgotten many times and I end up with the following structure (develop is obviously simplified):
How can I successively merge develop into main so that every commits tagged with “release” end up in the main branch ?
When I wanted to merge develop into main I could only do it with the last commit of develop. I also thought about creating a new branch from each commit tagged as a release and merge this one-commit branch to main but it seems not that clean.