I have two branches: main for the old release and dev for the latest release. I need to manage hotfixes effectively across these branches. Specifically, I need to:
- Merge features from dev to main after it finished.
- Apply hotfixes to main without missing them in dev.
What is the best approach to ensure that hotfixes applied to main are also incorporated into dev?
Additionally, how should I handle the situation where the dev branch is behind main due to differences in commit history from merge requests? What are the best practices for synchronizing these branches?
I expect to be able to merge hotfix to dev and main
if there better approach, please suggest it