You need to marry as per Germany law in Standesamt to get legal approval in Germany. Illegal marry doesn't allow any legal identity to your girlfriend. You will have to consulte with standtamt about getting married and process will take around 1 to 2 years.