If you have a permit/visa for studies in an EU country and are covered by an EU or multilateral programme or an agreement between universities, you may carry out part of your studies and work (in addition to your studies) in Germany if you fulfil certain requirements. You may reside and study in Germany for up to 360 days.
If you are not covered by a programme or agreement, you can apply for a new permit/visa in Germany (please see here and here).
A foreigner shall not require a residence title for stays for study purposes not exceeding 360 days, if the host educational institution in the federal territory has notified the Federal Office for Migration and Refugees that the foreigner intends to carry out part of his/her studies in the federal territory, submitting the following at the same time:
evidence that the foreigner has a residence title for study purposes from another Member State of the European Union which is valid for the duration of the planned stay and falls within the ambit of Directive 2016/801,
evidence that the foreigner wishes to carry out part of his/her studies at an educational institution in the federal territory, because he/she is taking part in a Union or multilateral programme that comprises mobility measures or because he/she is covered by an agreement between two or more higher education institutions,
evidence that the foreigner has been accepted by the host educational institution,
the copy of the foreigner’s recognised and valid passport or passport substitute, and
evidence that the foreigner’s subsistence is secure.
The host educational institution must make the notification when the foreigner applies for a residence title in the ambit of Directive (EU) 2016/801 in another Member State of the European Union. If, at the time of application, the host educational institution is not yet aware of the foreigner’s intention to carry out part of his/her studies in the federal territory, it must make the notification as soon as it becomes aware of this intention. If the residence title has been issued by a non-Schengen state, and if the foreigner enters the federal territory via a non-Schengen state, the foreigner must carry a copy of the notification and present it to the responsible authorities at their request.
If the foreigner is not denied entry and residence, the foreigner may enter the federal territory at any time during the validity of the residence title issued by another Member State and stay there to study. The foreigner shall be entitled to take up employment totalling no more than one-third of the period of residence, and to take up spare-time student employment.
The foreigner and the host educational institution shall be required to inform the foreigners authority of any changes to the requirements.