How to open a project in PhpStorm using command line

元气小坏坏 提交于 2020-01-13 19:57:52

问题


I am using Git Command Line, Homestead, Windows 10, PhpStorm 2017.3.

I want to open any project in PhpStorm using git bash /command line.


回答1:


Just pass FULL path to the project root folder as parameter to PhpStorm executable file -- IDE will either open existing project (if .idea subfolder exist) or will create brand new project from those files.

It works the same as if you would use Open from within PhpStorm and point to such folder.

An example:

"C:\Program Files\JetBrains\PhpStorm\bin\phpstorm64.exe" "C:\Projects\MyProject"
  • phpstorm64.exe is for 64-bit Java
  • For 32-bit Java you should use phpstorm.exe

You can add path to PhpStorm executable into system's PATH variable so there will be no need to use the full path. But then you have to install new versions into the same folder or update PATH as needed. The you could just use phpstorm64.exe "C:\Projects\MyProject".

You can also create some alias/batch file (similar idea to what Mac/Linux user have -- there IDE creates that for them) so it's easier to use. It's a bit more initial work but easier to keep the path up to date.




回答2:


You may want to specify another path for your program but if nothing else just use this I guess.



来源:https://stackoverflow.com/questions/49455663/how-to-open-a-project-in-phpstorm-using-command-line

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!