繁体   English   中英

使用git bash打开PyCharm的路径?

[英]Path for opening PyCharm using git bash?

我在 GitHub bash 中尝试了以下几行。我需要在 Git Bash 中设置 PyCharm 的路径,以便 PyCharm 应该从 bash 打开。

$ git config core.editor "PyCharm"
fatal: not in a git directory

$ git config core.editor "PyCharm --wait"
fatal: not in a git directory

在此处输入图像描述

To use PyCharm as the default editor in Bash (on Windows), you need to find where the PyCharm.exe is saved and copy the path to this.exe into the following command in Bash:

git config --global core.editor "'<path to PyCharm.exe>' --wait"

您正在运行的命令正在尝试为特定存储库设置编辑器,并且因为您不在一个存储库中,它会相应地告诉您。 要全局设置编辑器,请在命令中包含--global标志,例如git config --global core.editor "PyCharm"

这应该有效。

  1. 无论您的项目在哪里,都从git init开始。
  2. 这应该从 git 创建.git 文件夹。
  3. 现在运行你的命令。

这个想法是在 ever.git 存在的地方运行这些命令(在你运行 git init 后创建的 repostiroy 中)

在Linux上,在Bash中写入这条命令:

git config --global core.editor "pycharm-community"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM