Dear @Rania ddd,
Welcome to the Wefugees Community and thank you for reaching out to us.
I assume you are not holding a visa anymore but a residence permit for students? In Germany, residence permits are never getting "transferred" - you will always need to apply if you want to get another type of residence permit.
Coming back to your situation, if you are married to an EU-citizen who is entitled to the freedom of movement (when he is working in Germany, for instance), you can apply for a residency according to section 5 para. 1 of the freedom of movement/EU law. Please see this website for more information on the procedure and the requirements.
I hope this helps and please don't hesitate to get back to us with any further questions.
All the best,