The theme tune to Dads Army, “Who do you think you are kidding, Mr Hitler?” was Jimmy Perry’s idea, intended as a gentle pastiche of wartime songs. It was the only pastiche in the series, as the other music used was contemporary to the 1940s.
Perry wrote the lyric himself, and composed the music with Derek Taverner. Perry persuaded one of his childhood idols, wartime entertainer Bud Flanagan, to sing the theme for 100 guineas. Flanagan died less than a year after the recording.
The version played over the opening credits differs slightly from the full version recorded by Flanagan; an abrupt and rather conspicuous edit removes, for timing reasons, two lines of lyric with the “middle eight” tune:
“So watch out Mr Hitler, you have met your match in us
If you think you can crush us, we’re afraid you’ve missed the bus.”
Bud Flanagan’s full version appears as an Easter egg on the first series DVD release, and on the authorised soundtrack CD. Arthur Lowe also recorded a full version of the theme.
The music over the opening credits was recorded at Riverside Studios, Bud Flanagan being accompanied by the Orchestra of the Band of the Coldstream Guards. The closing credits feature an instrumental march version of the song played by the Band of the Coldstream Guards conducted by Captain (later Lt Col) Trevor L. Sharpe, ending with the air-raid warning siren sounding all-clear. It is accompanied by a style of credits that became a trademark of David Croft: the caption “You have been watching”, followed by vignettes of the main cast. (source Wikipedia)