After a buyout, the selling spouse doesn't need to worry about capital gains tax because the sale was part of the divorce. But if you buy out your spouse, stay in the house, and later sell the house to a third party, capital gains tax will apply to that sale.
If transferring before a divorce, the spouse will need to hold title as "married man/woman as their sole and separate property.". If transferring title after divorce, the spouse can hold the title as "Unmarried man/woman.". Once you have decided how the property is to be divided, you'll need to create a new deed to transfer the property.