如何使用命令行在PhpStorm中打开项目 [英] How to open a project in PhpStorm using command line
问题描述
我正在使用 Git 命令行,Homestead,Windows 10,PhpStorm 2017.3.
I am using Git Command Line, Homestead, Windows 10, PhpStorm 2017.3.
我想使用git bash/命令行在PhpStorm中打开任何项目.
I want to open any project in PhpStorm using git bash /command line.
推荐答案
只需将完整路径传递到项目根文件夹作为PhpStorm可执行文件的参数-IDE将打开现有项目(如果.idea
子文件夹存在)或将从这些文件创建全新的项目.
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.
它的工作原理与您在PhpStorm中使用Open
并指向该文件夹一样.
It works the same as if you would use Open
from within PhpStorm and point to such folder.
一个例子:
"C:\Program Files\JetBrains\PhpStorm\bin\phpstorm64.exe" "C:\Projects\MyProject"
-
phpstorm64.exe
用于64位Java - 对于32位Java,您应该使用
phpstorm.exe
phpstorm64.exe
is for 64-bit Java- For 32-bit Java you should use
phpstorm.exe
您可以将PhpStorm可执行文件的路径添加到系统的PATH
变量中,因此无需使用完整路径.但是随后您必须将新版本安装到同一文件夹中,或者根据需要更新PATH
.您可以只使用phpstorm64.exe "C:\Projects\MyProject"
.
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"
.
您还可以创建一些别名/批处理文件(与Mac/Linux用户所拥有的想法类似-IDE会为他们创建该文件),以便于使用.最初的工作要多一些,但是要使路径保持最新状态更容易.
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.
这篇关于如何使用命令行在PhpStorm中打开项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!