You need an amp switcher. They are expensive, especially if 1 or more tube amps is involved.
You would hook the amp switcher to the speaker output of both heads, and then to the speaker cab/s. When you want to switch between the heads, you hit the footswitch, and boom.
Now, if you're using the same pedal board for guitar and bass, you'll also need to switch the input and output of the pedal board (unless you want to reconnect things between songs). So you need an ABY box between your guitar and bass and the pedal board input, and another one between the pedal board output and the 2 heads. Honestly though, unplugging the bass and plugging in the guitar at the cable and then stomping the amp switcher would be easier (especially if you have a tuner pedal that you can use to mute the signal).
Really depends on how exactly you plan to integrate both instruments into the show.