We have 2 teams of developers working on a single system. Team A is working on a 'master' branch (our production branch). They will branch from 'master' to feature or bugfix branches and merge back into 'master' for releasing.
Team B is working on an 'upgrade' branch which is branched from 'master'. They follow a similar approach of branching from 'upgrade' to feature or bugfix branches and then merge back into 'upgrade' once their work is done.
Eventually the 'upgrade' branch will replace 'master' once the upgrade is complete. In the mean time how do we keep the 'upgrade' branch in sync with 'master'?
To date I've been rebasing the 'upgrade' branch on 'master' weekly. The problem is that this rewrites history and creates chaos for members in Team B when they want to pull from or push changes to 'upgrade'. How should we continuously integrate 'master' and 'upgrade' in a simple and clean manner?