The 21-year-old is thought to have impressed manager David Penney who has given him a contract until the end of the current campaign.
Foy made 22 appearances for Forest, mainly under David Platt, but has failed to command any sort of place under Paul Hart.
Penney told the club's website: "His work rate and skill has led us to give him a contract."
Foy was accused of being overweight whilst at Forest and was encouraged to change his lifestyle before being transfer listed. He was then released earlier this season before linking up with Doncaster at Belle Vue where he has been on trial for eight weeks.