Ian Desmond singled in Bryce Harper in the 10th inning, and the Washington Nationals beat the San Francisco Giants 2-1 on Wednesday to avoid a three-game series sweep.