What’s the difference between the state tool
Previously I used state activate but the current documentation appears to emphasize state checkout.
Hi wilb, thanks for your question. We are recommending users stop using
state activate and start using
state checkout, and the reason comes down to user control. Previously,
state activate would pull down your project to your working directory, install it somewhere on your system (users had no control over where), and open a secure shell in your command prompt. There wasn’t a lot of opportunity for user customization, and because of that many found it somewhat limiting.
state checkout, you can get your project anywhere on your system in several different ways. After checking out your project(s), you can either open a secure shell for your project using the state shell command (which will close when you end your session or type
exit into the command prompt. Useful when working with multiple projects), or set the project as your system default with the state use command.
state activate can still be used, but we encourage users to explore new and better ways to get the most from their project. I hope that answers your question, if there is anything else we can help with please let us know.
Thanks for your reply. Does
state clean cache still apply for reset of an uncertain workspace?
@wilb Only partially. You also have to remove and recreate the yaml control file that describes where the project has been placed. A “state clean cache” and a manually removal of the project control folder can be followed by a fresh checkout, but make sure you read and understand the command options and flags for checkout. The defaults will work exactly like “activate” did, and won’t change anything even if you do the cleanup.