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"
The command that you are running is trying to set the editor for a specific repository, and because you are not in one it tells you accordingly. To set the editor globally, include the --global
flag in your command like git config --global core.editor "PyCharm"
this should work.
git init
wherever your project is.the idea is to run these commands where ever.git is present ( that in your repostiroy which is created since once you run git init)
On Linux, write this command in Bash:
git config --global core.editor "pycharm-community"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.