A friend of mine went through this... didn't hurt his credit or hers.
Divorce doesn't change anything on your credit report, it's what you do with the open accounts that matters.
In my case, I quit-deeded the home to her and let her take over the mortgage. There was risk to my credit since my name was still on the mortgage, though it's was also in hers so it was in her best interest as well to keep making payments. My report was fine as it just showed as my having an open mortgage being paid every month until the home was sold and the mortgage was paid off. That is, after the divorce, we didn't refinance as it wasn't worth doing. My relinquishing my claim to the home satisfied the divorce decree.
I wouldn't advocate my approach to others, but for our particular situation it was appropriate and worked well enough.