Origin of the term "gig"

Anyone know where the term “gig” came from? I’m refering to the musical usage (as in reference to a concert or performance).

THE GREAT AMERICAN BIG BANDS has this to say:

And from Word Origins we get:

And, from Take Our Word For It there’s also this:

Thanks Ringo. I wouldn’t have known where to start looking. Some interesting possibilities there.