What do you do if you have crushing debt, but your spouse has good credit that you don't want to ruin by filing bankruptcy? Or your spouse has property that they got before you were married, or has gifts or inheritances that you want to protect in bankruptcy?
In California, which is a community property state, each spouse is personally responsible only for their own debts, even if those debts were acquired while married. However, a creditor can go after your community property for the individual debts of either spouse. Community property is everything that you've acquired since you've been married, except for gifts and inheritances.
When one spouse needs to get rid of debts and the other has good credit, the spouse with the debt problem can file an individual bankruptcy in order to protect the credit of the other spouse. The non-filing spouse's credit report will not be affected by the filing spouse's bankruptcy. (However, a joint credit report would show the bankruptcy.)
Another situation is when one spouse has a lot of assets that are their separate property and the other spouse has debt problems. Some examples of separate property are a house or car that one of them bought before getting married, a valuable gift, or any inheritance. If those assets cannot be protected in bankruptcy, the spouse with the debt problem can file an individual bankruptcy and the assets will not be part of the bankruptcy. (For more discussion about protecting assets in bankruptcy, see Protecting Your Property From Liquidation.)
If one spouse has all or most of the debt problems and the other has good credit or a significant amount of assets, filing an individual bankruptcy is the way to protect the other spouse's credit and/or separate assets. The filing spouse gets to eliminate their debts and the other spouse gets to keep their good credit and their separate assets.