If your home of record is outside of California, you should file as a nonresident, even if you were stationed in California during 2020.
In this case, if your only income was from military wages, you don't need to file an income tax return for California.
If you DID earn income other than military wages in California, you'll need to file a nonresident tax return to report the nonmilitary income (exception: military spouses).
Military Spouses: If you were a military spouse, you (and your spouse, if filing jointly) don't need to file a nonresident return for the state you were stationed in if the nonmilitary spouse was only in the nonresident state solely due to the military orders of his or her spouse.
If your home of record is in California AND you were either stationed in California or left California under a temporary duty (TDY) assignment, then you are considered a resident of California and should file as such.
If your home of record is in California AND you were stationed outside of California on a Permanent Change of Station (PCS) order, California considers you a nonresident while outside of California on this order and you should file as a nonresident of California.
If any of these definitions apply to only part of the year, you may need to file as a part-year resident.