4

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.

2
  • 1
    That either won't work or will be a whole lot of work. PHPStorm generates a lot of it's own files when you open a project (like the .idea folder), also it generates some xml files, indexes the project ... there is no way to do all this via the command line. That's a project in itself. Commented Mar 23, 2018 at 17:54
  • Not properly helpful answer . by the way , thanks for comment Commented Mar 23, 2018 at 18:03

2 Answers 2

6

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.