Thanks to Susanne Kemmer at Rice University and her Word Stories Web site, you can figure out why Julie Andrews was singing about female deer on that Austrian mountain:
This word comes from the history of music. Guido d'Arezzo, an 11th-century musician and former monk, devised a system of musical notation that was a precursor to our modern system of notes and staffs.
D'Arezzo's system had a six-note scale, represented on a higher and lower staff. The first line on the lower staff he called by the Greek letter gamma. The lowest note in the scale was called "ut" and was placed on gamma. This first note was soon called "gamma ut," which contracted to "gamut." At some point, French musicians began referring to the whole scale (by then an octave) as the "gamut," a typical example of metonymy. The term was next extended to refer to the musical range of an instrument or voice. By the seventeenth century "gamut" was further generalized to mean an entire range of any kind.
The story of gamut also relates to the syllables commonly sung to the tones of the musical scale (do, re, mi...). D'Arezzo named the six notes in his scale after the first syllables of six lines of a hymn sung to John the Baptist:
re sonare fibris
Mi ra gestorum
fa muli tuorum
Sol ve polluti
la bii reatum
"That with full voices your servants may be able to sing the wonders of your deeds, purge the sin from their unclean lips, O holy John."
In the seventeenth century ut was replaced by the more singable do. With the introduction of octaves a new note name was needed and si, was added, probably formed from the initial letters in sancte Iohannes. The seventh note is now more usually sung as ti.
If you want to listen to the hymn that gave rise to gamut, click the link below for "Ut Queant Laxis" by Gilles Binchois.