月度归档:2021年05月

PhpStorm/IntelliJ/Pycharm 支持git-bash以及powershell

How to use PowerShell as default terminal in IntelliJ/PhpStorm/Pycharm/…

  1. Open IntelliJ settings.
  2. Go to the “Tools” section.
  3. Press the “Terminal” option.
  4. Set the correct Shell path to the PowerShell EXE file. In the case of Windows 8.1, the path is: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe. You should use the latest PowerShell version available!
  5. Create a new terminal session in IntelliJ. Alternatively, you can just restart IntelliJ to apply the changes.
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

Setup JetBrains(InteliJ, WebStorm, PHPStorm) IDE terminal to use GIT bash

  1. File
  2. Settings
  3. (Enter ‘Terminal’ in search)

Change Shell path to:

"C:\Program Files\Git\bin\sh.exe" --login -i

git对于不同仓库使用不同的ssh key

配置 core.sshCommand:

从 Git 版本 2.10.0 开始, 可以通过这个配置配置全局或者个别仓库使用的key了

git config core.sshCommand "ssh -i ~/.ssh/id_rsa_example -F /dev/null"
git pull
git push