Hello,
If you migrate your app to Git and it meets the eligibility criteria, all your branches will be migrated as well.
Please follow the document below, it will guide you through the process:
https://docs.mendix.com/developerportal/general/migrate-to-git/
To migrate to Git, all your branches should be at least Studio Pro version 9.12 or above and your Main branch should be Studio Pro version 9.24.28 or above.
I hope this helps!
BR,
Peter