In order to upload a new sketch on your Galileo, you have to make sure that the correct board and the COM port are selected. Then you have to press the upload button in the Arduino IDE. Check the picture below:
There is an onboard button to reset the sketch. You should use that one instead of the extra switch that you are connecting.