Greetings Mustafa
Yes a head gasket leak will throw a P0012 and a P0015 DTC code
That being said, before you assume a blown head gasket you should check to make sure your oil filter housing gasket is not leaking, this is a common issue on the BMW engines. Coolant and oil will mix looking like a head gasket issue.
Replace the oil filter & oil cooler housing gaskets pop the lower radiator hose off, drain and flush the coolant system. Fill with new coolant and bleed the system with low fan high heat key on leave coolant cap off and you will see it bleeding the air out of the system.
You will need a 1/4 drive E10 socket and 1/4 U-joint adapter will be necessary to get one of the bolts off that is under the intake manifold.
That is where I would start. I would then move on to pressure testing and checking other areas where the coolant / oil could potentially mix. however its usually one or both of the above gaskets.
I hope this helps
Cheers,
Monte