depends on the market, if it's a seller or buyer's.
You can add a home sale contingency to a contract for another home. That gives you an out from owning two.
If you know regardless that you will sell your current home, then I recommend putting it on the market, there's always options for bridging the gap.
You can also do a lease back option, where after selling, you both agree that you will rent the house (yours that you just sold) from them for the cost of the mortgage per month, divided by 30 for how many days you'll occupy, you just need a buyer to agree. Surprisingly, this works quite often.
Remember though, as a SELLER, once you enter into a contract, you can be sued if you back out. Not so with a Buyer, if in option period, or contingency (financing, sale contingency, etc)