windows - pycharm 无法识别 Git

标签 windows git pycharm

我正在尝试使用 pyCharm 从 bitbucket 中提取 github 存储库。

我在版本控制/Git 下添加了 git 可执行文件的路径并安装了 bitbucket 插件。如果我测试两者,它表示测试运行良好。

但是,当我现在打开终端并尝试 pull 出这样的代表时:

 git pull https://marcvanderpe<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a9ccdd9890919ae9cbc0ddcbdccac2ccdd87c6dbce" rel="noreferrer noopener nofollow">[email protected]</a>/marcvanderpeet1983/betfair_predictions.git

我收到以下错误:

 'git' is not recognized as an internal or external command,
 operable program or batch file.

对这里出了什么问题有什么想法吗?

最佳答案

终端与您设置的这些选项无关。终端只是将您的命令转发到操作系统,在您的例子中是 Windows。您必须在 PATH 环境变量中添加 git.exe 的路径,注销并重新登录到 Windows 才能从 cmd.exe 使用 git 或您尝试使用的终端。

PyCharm中的设置只是为了Git集成,以便PyCharm可以使用Git。因此,如果您使用 PyCharm GUI 和菜单来使用 Git,则该设置将被使用并起作用。我猜想通过 BitBucket 插件,您可以获得用于克隆、 pull 请求等的额外 GUI 选项,但我不知道,因为我不使用 BitBucket。

关于windows - pycharm 无法识别 Git,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41445025/

相关文章:

git 在推送操作期间卡住了

javascript - Pycharm:导航到 require ('path/to/file' 中指定的 JS 源)

windows - Windows PATH 中的某些字符串导致错误

windows - 使用带有 Web 平台安装程序 API 的 Powershell 仅在 64 位计算机上获取 x86 安装程序

git - git rm 是否删除文件的所有历史记录?

git - 将本地 master 转换为 git 中的分支

python - 我如何告诉 PyCharm 参数应该是什么类型?

PyCharm:如何让 pycharm 支持鼠标水平滚动

windows - 将字符串作为参数发送到批处理脚本中时,^ 会加倍

python - 如何正确转换列表的输出值以将它们用作函数内的参数?