Once they splutter add the ginger, asafoetida and green chilli and fry them till the raw aroma of ginger goes away.
Add onions and saute till they get soft and translucent.
Add the tomatoes, turmeric, salt and garam masala and fry the masala till the tomatoes become soft and mushy.