I know there are plenty of similar situations on Stack Overflow, and even the in Internet in general.
I just can't find an appropriate answer to my issue.
My situation:
I made a quick ASCII art so that you can better picture it.
A-B———C---D-M # Dev
\ /
X-Y—Z # Release
This is a Release created days ago. On the M commit of the branch Dev, after the Release, I created a new feature, I modified a lot of code, then I finished my feature and merge.
Now imagine, at the commit N, after the Release, after the new Feature, when the feature is now merged into dev. I created an Hotfix from my previous release (ASCII Art).
This Hotfix is just an update of a specific library.
I finished the Hotfix after updating the library, then merged it to dev and master. But it screws up my Dev Branch, now I can't continue working because my Dev Branch is now old from the Release with the Hotfix modification.
My question is how to avoid this situation ?
And moreover, can I delete this hotfix from Dev and Master in order to create a new release branch from my current dev and not an Hotfix from old Dev branch?