簡體   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