If we discover bug in some branche we fix it (check New release on picture). But also we interesting in moving this fix to Old release and Main de
You could:
Find common parent. Thanks to Novelocrat for this step.
git merge-base branch1 branch2 branch3 ...
Checkout the common parent
git checkout A
create new branch to fix bugs on
git checkout -b bugFix
Make bug fixes and commit them to bugFix branch
Checkout branch that needs the bug fix
git checkout branchToApplyFixTo
Merge the bugFix into the branch
git merge bugFix
You could git cherry-pick bugfix
on each affected branch that you want to fix. This would generate a new commit id for the fix on each branch, though.
This why people make separate branches for each feature or bug fix. Then the only trick is to make sure when you create the branch, it is from a point that excludes any commits you wouldn't want included in every branch you intend to merge back into. If you forget, you can just rebase it to that point before doing any merges. If you don't catch it until after it's merged back into your new release branch as shown in your example, the best option is probably cherry picking, although that can make future merges very difficult if you use it too often.