Noted Bandmaster Patrick Gilmore wrote the lyrics for this tune when his band was attached to the 24th Massachusetts Infantry. The tune is the same as the Irish song "Johnny, I Hardly Knew Ye" but there is some dispute as to which came first.
"Johnny" did not refer to "Johnny Reb" but most likely Gilmore's future brother-in-law, a Union army officer. The story behind the song is on the Library of Congress website.
http://lcweb2.loc.gov/diglib/ihas/loc...
The first page of the song (Louis Lambert was a pseudonym of Gilmore's) bears a dedication at the top "to the army and the navy of the Union". This was not a Confederate song and more than a few people on youtube need to learn how to do some very simple research.
http://library.duke.edu/rubenstein/sc...