You get a special breaker that as you throw it, it turns off the grid and turns on your gen.
It's called a mechanical interlock kit that requires a 30A 2 Pole breaker to be installed to the closest breaker to the main which will wire to the generator feed outlet. It's about $60 and allows you to safely and legally switch power manually on your existing panel and have power on the entire panel. This is easily the way to go since you don't have to pick certain circuits as you would for an auto switching unit and you can plug into any portable generator.
Totally worth the time invested to add it.