How to update Unity on all branches of a project

I’m working on a Unity project. We are using Git and have multiple branches. What is the best method to update project to a new Unity version on all branches with minimum hassle?

Note: I don’t want to merge all branches and I don’t want to update each branch separately.

I’ve had this issue while working with another programmer for a short time.

What I did was:

  1. Update master (or main branch) on new Unity version.
  2. Rebase or merge from master to current branch for each branch. I try to enforce this even without a Unity upgrade to prevent any potential future conflicts and keeping the working branch up to date as much as possible.
  3. Install new Unity version on each machine. IMPORTANT: do this after step 2, then open the project.

Inevitably a Library update will take place and some assets will be re-imported, but the hassle will be at minimum.

This is the least painful way I’ve managed this.