Preventing baby from grabbing hair

I recently had a baby who is soon going to be grabbing and pulling out my hair. It is very long and has layers- buns give me headaches and braids work for half a day before the layers have escaped. Any tips for how to have my hair back/up without breakage?