How to open folders in VSCode via Terminal in a fresh state?

I tried to do it through command line using the command

code -n .

which should have opened VS code in current folder with a new session but it does not seem to work at all. I believe that code . seems to ignore the -n new session option and restores the previous session for the folder. So this feature is probably not implemented in VS code.

(Refer here for the commandline options for VS code.)


this is the command that works for me on windows

code -r .