If you move out before filing for divorce, the court may decide that the other party gets the house pending the divorce. But once you get to trial and the divorce will be finalized, the court decides who gets the home. In some cases, the court may decide that you two are to sell the house and split the profits, which will also depend on the home’s value and equity.