The 22-year-old, for whom York have paid an undisclosed compensation fee, has signed a two-year contract at Bootham Crescent.
"David is another good striker we've now got in the squad and I'm really pleased to have signed him," manager Gary Mills told Press Association Sport.
"We've been without Ashley Chambers for a few games now and we've been a bit short of strikers, but David gives me more options.
"Oli Johnson is also back with us after his injury problems. He needs a couple of games with the reserves and will be like another new signing.
"We need to get them sharp and they will give me more options to change things during a game. They will hopefully start making a real difference."
McDaid, who scored 21 goals in 86 appearances for Derry, is Mills' fourth new signing following the recent arrivals of teenager Jack O'Connell, on loan from Blackburn, fellow defender, Jameel Ible, 19, from Salford City and striker Ben Everson from Icelandic side Breidablik.
Mills has also confirmed his interest in former Aberdeen defender Dean Jarvis, who has recently been playing in the second division in Northern Ireland with Institute.
Jarvis, 20, a Northern Ireland Under-21s international has been training with the Minstermen, but has also attracted interest from a Barclays Premier League side, understood to be Norwich.
- Sports & Recreation
- Gary Mills