In "Gee! But there's class to a girl like you" (1908), the "gee" is almost an expression of wonder. There are song titles of opposing sentiments - "Gee! but I'm blue" (1927) and "Gee! but I'm happy" (1936 - lyrics by the famous "Ukulele Lady" May Singhi Breen). "Gee, but it's good to be here" (1922) contrasts strongly with "Gee! but I hate to go home alone" (1922). There are also two lovelorn country songs -- "Gee, but it's lonely" (1958) by Phil Everly of the Everly Brothers and "Gee, but it's lonesome out tonight" (1950) by Fred Rose.
The OED dates the earliest usage of "gee" from 1895. In our older collection of HP "hit parade" sheet music collection there are three early "Gee, but" songs: "Gee! But this is a lonesome town" (1906), "Gee, but it's great meet a friend from your home town" (1910), and "Gee, but I'd like to furnish a flat for you, dear" (1910). The latter song was from the show The Summer Widowers is an indirect marriage proposal (change your "Miss to Missus" and I'll let you wear my name), and the syllable "Gee" adds a little emphasis.
The latest songs of this batch date from 1958, indicating that "gee" as an exclamation was on the wane. "Gee, Officer Krupke" (1957) from West Side Story signals this with the mock innocence of the Jets sang. But a cross section of songs gives a sense of the popular language of the first half of the twentieth century.