This was after the great "reconciliation" that began with the Spanish-American War, when northern troops were commanded by former Confederate officers.
Now, IIRC, one of the former Confederates in the Spanish American War (Wheeler?) forgot exactly who he was fighting in the heat of battle, and shouted "Go git 'em boys! We got them damyankees on the run!"