'Change branch strategy with master and develop branch squash commit policy to something like Git flow or similar

Im working in a legacy project where there is a strange merge policy (at least in my opinion) where they decided to squash commits for both develop and master branch which results in complex merges sometimes.

I personally think that squash merge from a feature to develop is a good thing but otherwise a like to keep the history intact.

So to my question: How would you fix this when there is 2 diverged branches (master and develop)? I want master to be a continuation of develop after a release is made and not a squash commit to master-branch.

I could change the policy on master and make a huge commit with thousands of commits but that is really ugly. I rather remove the master branch entirerly and start from scratch if that would be possible. But I cant delete the master branch!

git branch -m master old-master
git branch -m newmaster master
git push -f origin master

This could be one solution to the problem. I bit scary and what would happen to my previous tags on my old-master?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source