In order to protect your credit during a divorce, you may want to
Close or separate joint accounts.
Take your spouse off as an authorized user.
Pull your credit reports and monitor your credit score.
You may want to consider freezing your credit in some situations.
Refinance whenever you can, mortgages and vehicles.
Keep paying all bills until you can separate your accounts, at least send in the minimum payment on all individual or joint accounts.
Establish your credit independent, by getting a credit card that has a small credit limit and pay your bills on time.
If you cannot get credit on your own, as a family member or friend to co-sign on a loan or credit application. After paying on time for a few months, try again to get credit on your own.
Build a positive credit history.