The best way to release a fish from a boat is to ensure it does not leave the water.
Use a shallow pan-shaped net that will allow you easy access to the fish, and make sure the net has a soft knotless mesh.
Guide the fish into the waiting net but don’t lift it into the boat. Keep the net in the water, but make sure the fish doesn’t bang against the side of the boat.
Lean over, taking care not to overbalance, release the hook using forceps or a catch and release tool, and tip the fish back into the water.