To get an injunction you first need to file your civil complaint for breach of contract, and breach of the business and professions code (false advertisements, etc. - primary statutory codes involved in Bait and Switch complaints - B&P 17500, CC 1770(a)(9)(a)(10), 16 CFR Part 238)
Once you file your complaint, you will immediately file what is called an "ex parte" motion for a temporary restraining order prohibiting the dealer from selling the vehicle. This motion will be heard on the "ex parte calendar" for the court, so there will be a department that has ex parte hearings available every day of the week.
This kind of "prejudgment relief" is considered to be extraordinary relief and it is not often given, it is only given when it will prevent "irreperable harm" (meaning you, as the injured party, cannot be made whole if the other party is able to continue with the conduct that they are attempting to conduct).
You can try this motion for injunctive relief, it has a possibility of prevailing, but realistically I do not see it having a very high likelihood of success, vehicles are not seen as being intrinsically unique, and it is possible to get another like vehicle (even if the dealer ends up having to pay a substantially higher sum to cover the difference).
(Also, in addition to filing your civil complaint, you can file a complaint with the California Attorney General: https://oag.ca.gov/contact/consumer-complaint-against-business-or-company)