Will Allah forgive someone who committed a sin but didn't know it and then repented?
Praise be to Allah, the Lord of the Worlds; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions. Whoever commits sins and then repents, Allah will accept his repentance regardless of whether he knew that the sins he committed were forbidden or not. For more on repentance and it conditions, see Fatawa: 84677 and 83145. Allah knows best.
You can search for fatwa through many choices