You can choose to file as Married Filing Jointly or Separately. While both states say that you must generally follow the federal status, both states also allow to file separately as an exception if one taxpayer was a resident, and the other a nonresident during the entire tax year of the respective states.
Which option to choose? Whichever gives you a better tax result.