It is a fairly simple task to connect a GPS to a G-858 magnetometer. You can use the External I/O cable assembly and a null modem to connect the G-858 to most GPS receivers.
Null modems are available from Geometrics or from local Radio Shack or computer stores. The Null modem pin configuration for GPS receivers that have a data cable compatible with 9 pin IBM PC COM ports has male pins on both sides.
The GPS should be set to output NMEA data that contains the $GPGGA sentence. Be sure to set the RS232 protocol to 9600 Baud, 8 Databits, 1 Stop Bit and No Parity.
The G-858 must have its serial port set to the same baud rate as the GPS.
You can use System Setup -> Com & Field Note String Setup -> Chat Mode to determine whether correct communications have been established.