Merging unrelated branches

We recently migrated our code from Perforce to GitLab. We used git-p4 (Git - git-p4 Documentation) for the migration. Unfortunately, the migration resulted in the creation of unrelated branches. For example, master is unrelated to develop, develop is unrelated to release, and release is unrelated to master.

We are trying to do our first merge from release to master but this results in hundreds of merge conflicts.

Is there a way to migrate to GitLab so that branches are related at the time of migration? Or is there away to “relate” unrelated branches after they are migrated to GitLab?