I know I've responded to this before, but can't find it.
The best explanation of the origin of the song comes from "The Life and Legend of Leadbelly" by Wolfe and Lornell (referenced above as Wolfe and Cornell - obviously, someone else types like I do! *bg*)
The reference can be found through out the book, but your best bet is to get a copy from a library and read pages 52-56. There is an excellent argument that the song pre-dates the 1880's as sumg by "Haverly'd Colored Minstrels."
The references from the book are a little too long to scan in, but if someone wants them I'll be happy to do that.