Wire the limit switches with two or three core, shielded cable. The shielding is important; by my experience the noise from the motors will give false triggers otherwise. With two core cable, use the shield as the gnd connection; with three core cable, use one of the cores a separate GND wire and connect the shield to GND on TinyG side. (In theory, three core wiring is even more noise-proof than two core. However, I’m using two core wiring in my machine without issues.)
Wire the switches like this:
The Xmin switch is the one that triggers when the gantry is moved all the way left, while the Xmax switch triggers on the far right. The Ymin switch activates when the bar goes all the way front, and the Ymax switch is at the far back. The Zmin switch triggers when the head is all the way up and the Zmax switch is the one triggering when the needle pushes the tube up.