Selling home this year I owned before I got married should I file taxes separately or jointly?

I got married this year and I own a home I lived in alone for the past 10 years. Now that I’m moving into my spouse’s home, I plan to sell my old home before the end of the year.  Should I file my taxes jointly with my spouse or separately to be eligible for the no capital gains tax eligibility of living in my home the majority (all) of the last 5 years? My concern is that if I file jointly, since my spouse did not ever live in my house, it would show no eligible residence in the past 5 years.