The song was first published in 1866, which was a number of years after it had first been sung. The cheery song sung by Southern soldiers at night time campfires belied their grim circumstances. The starving soldiers had resorted to boiling peanuts (goobers) as a main food source.