本文翻译自:Where is git.exe located?

I have PyCharm and I am looking around trying to find git.exe to set it up with my repo. 我有PyCharm,现在正在四处寻找git.exe,以使用我的存储库进行设置。

What is the PATH to git.exe? git.exe的路径是什么?


#1楼

参考:https://stackoom.com/question/o3A9/git-exe在哪里


#2楼

If you can use the git command it should be in your path? 如果可以使用git命令,它应该在您的路径中吗? thus this should work asuming linux or linux like os 因此,这应该工作假设linux或os之类的linux

which git

else also asuming linux like os 否则也像os一样假设linux

cd /
find . -name "*git*"

if on windows tell me what version you are using and I'll help you. 如果在Windows上告诉我您使用的是什么版本,我会帮助您。 The default path on windows is C:\\Program Files (x86)\\Git . Windows上的默认路径是C:\\Program Files (x86)\\Git

The name of the executable is not git.exe on all systems. 在所有系统上,可执行文件的名称都不是git.exe


#3楼

If git.exe is indeed in your %PATH% (that is, if you can type a git --version in a DOS windows), then which git.exe will tell you where. 如果git.exe确实位于您的%PATH% (也就是说,如果您可以在DOS窗口中键入git --version ),则which git.exe会告诉您在哪里。
(provided you did install GoW: Gnu on Windows : 130 unix commands compiled for windows, including which ). (前提是您确实在Windows上安装了GoW:Gnu :130个针对Windows编译的unix命令,包括which )。

Jonny Leeds comments below that you also can use where git.exe 乔尼·利兹(Jonny Leeds) 在下面评论说,您也可以where git.exe使用
(except with Powershell, for you need to use where.exe git.exe , instead of the PowerShell command where ) (Powershell除外,因为您需要使用where.exe git.exe ,而不是PowerShell命令where

If not, don't forget you can install git wherever you want, with the 如果没有,请不要忘记可以在任何位置安装git portable version of msysgit msysgit的便携式版本 . It is just an archive you unzip in any directory of your choice. 它只是您在选择的任何目录中解压缩的存档。

Update 2015: use the portable version of "git-for-windows" , like: 2015年更新: 使用便携式版本的“ git-for-windows” ,例如:

PortableGit-2.4.4.2-3rd-release-candidate-64-bit.7z.exe

Then add to %PATH%: 然后添加到%PATH%:

  • c:\\path\\to\\PortableGit-2.4.4.2-3rd-release-candidate-64-bit\\cmd
  • c:\\path\\to\\PortableGit-2.4.4.2-3rd-release-candidate-64-bit\\usr\\bin

You will not only get git.exe , but also 200+ executable for Unix commands! 您不仅会获得git.exe ,而且还将获得200多个Unix命令的可执行文件! No more GnuOnWindows to install. 不再需要安装GnuOnWindows。
See more at " Why is it that if you download Git 2.0 from the net, you always get a 1.9.4 installer package? ". 请参阅“ 为什么从网上下载Git 2.0总是得到1.9.4安装程序包? ”。


More recently (2017), from Luke McGregor 's answer , for the new GitHub Desktop : 最近(2017年),来自Luke McGregor的答案 ,用于新的GitHub Desktop :

"%LOCALAPPDATA%\GitHubDesktop\app-[gfw-version]\resources\app\git\cmd\git.exe"
For instance:
%LOCALAPPDATA%\GitHubDesktop\app-1.0.1\resources\app\git\cmd

#4楼

如果您安装了msysgit ,则该路径在64位系统上看起来像c:\\Program Files (x86)\\Git\\bin\\git.exe ,否则只需下载并安装它,PyCharm并不随Git客户端一起提供。


#5楼

If you're using GitHub for Windows , git.exe may not be in your PATH, but you may find it in a location like: C:\\Users\\<username>\\AppData\\Local\\GitHub\\PortableGit_<numbersandletters>\\bin\\git.exe 如果您在Windows上使用GitHub ,则git.exe可能不在您的PATH中,但您可以在以下位置找到它: C:\\Users\\<username>\\AppData\\Local\\GitHub\\PortableGit_<numbersandletters>\\bin\\git.exe

That's the situation for me, in Windows 7 + version 1.0 of GitHub for Windows. 我的情况就是这样,在Windows 7 + GitHub for Windows版本1.0中。

In Windows 10 it appears to be in: 在Windows 10中,它似乎位于:

C:\\Users\\<username>\\AppData\\Local\\GitHub\\PortableGit_<numbersandletters>\\cmd\\git.exe

( \\cmd versus \\bin) (\\ cmd与\\ bin)

From GitHub Desktop 1.1 从GitHub Desktop 1.1

The UI is different and the Git path now is in: 用户界面有所不同,Git路径现在位于:

C:\\Users\\<username>\\AppData\\Local\\GitHubDesktop\\app-<appversion>\\resources\\app\\git\\cmd\\git.exe

PS: AppData is a hidden folder by default. PS: AppData默认为隐藏文件夹。


#6楼

First ,you should install github in your PC; 首先,您应该在您的PC上安装github; Second,you can download the tool ' Everything '; 其次,您可以下载“ 一切 ”工具; Third,open the tool everything ,type git.exe ,then you will find the location and copy the location to PyCharm ,and Test,you will see successfully! 第三,打开所有工具,输入git.exe ,然后找到该位置并将该位置复制到PyCharm并进行测试,您将看到成功!

git.exe在哪里?相关推荐

  1. git.exe init#timeout = 10错误:克隆远程repo'origin'时出错hudson.plugins.git

    用Jenkins自动化搭建测试环境,Jenkins构建任务 关键异常抓取 git.exe init#timeout = 10错误:克隆远程repo'origin'时出错hudson.plugins.g ...

  2. github git.exe位置

    C:\Users\yourname\AppData\Local\GitHub\PortableGit_69703d1db91577f4c666e767a6ca5ec50a48d243\bin\git. ...

  3. php.exe系统错误,PhpStorm中报 “Cannot run program git.exe, 系统找不到指定的文件” 错误的解决方法...

    在使用PhpStorm的GitHub或Git功能时,经常会出现以下错误信息: Cannot run program "git.exe": CreateProcess error=2 ...

  4. 我只是bug的搬运工之idea的Cannot run program git.exe: CreateProcess error=2

    在出现Cannot run program "git.exe": CreateProcess error=2时,说明未正确引入git.exe 我们需要做如下几步 1 下载git.e ...

  5. WebStorm导入git.exe报错 Empty git --version output:

    在win10中使用WebStorm clone git地址的时候出现了 Empty git --version output: 而且git-bas位置正确,也可以启动 需要找到git安装目录下与git ...

  6. Failed to connect to repository : Error performing git command: git.exe

    在测试Jenkins来build来自Github的项目的时候,总是报错如下: 在cmd命令行里执行git命令显示如下: 说明git在系统已经安装,而且环境变量PATH也设置了. 研究了好久才找到解决方 ...

  7. window7 安装TortoiseGit没有git.exe 和 右键没有clone等按钮解决方法

    这里只记录我所遇到的问题,有遇到类似问题的小伙伴可以参考一下 我个人之前一直用的SVN,当时直接用的TortoiseSvn安装的,这次想试着用GIT,用TortoiseGit安装后发现有问题.右键已经 ...

  8. npm install 报错 C:\Program Files\Git\cmd\git.EXE ls-remote -h -t git://github.com/adobe-webplatform解决

    报错信息如下 ...... 27013 silly saveTree `-- ssf@0.10.3 27013 silly saveTree `-- frac@1.1.2 27014 verbose ...

  9. 解决 “git status”失败,错误代码 1:BUG(fork bomb):D:\Git\bin\git.exe·····

    今早打开sourcetree后,发现每个仓库都出现了以下问题: 因为很多代码我都是托管在gitee上,近期gitee运营出现很多问题,很多开源仓库都被关闭了,一开始以为是gitee的的问题,但是打开g ...

最新文章

  1. LoadRunner中log的使用总结
  2. day8 动态导入模块、socket进阶
  3. 十三种基于直方图的图像全局二值化算法原理、实现、代码及效果。
  4. Java多线程知识小抄集(二)
  5. NET 自定义配置文件 Configuration
  6. 关于nginx unit服务非正常关闭后,无法重新启动问题的处理
  7. day060 中间件及session源码
  8. CSS中clear:both用法及事例
  9. 个人理财系统springboot项目开发(一)需求分析文档
  10. excel表格中身份证信息提取出生年月日,年龄,性别,出生地
  11. 手表频率测试软件,石英钟表测试仪是一款测量石英钟的灵活的工具
  12. 从Hadoop到Spark和Flink,大数据处理框架十年激荡发展史
  13. 江苏省对口单招分数线计算机,2021年江苏省对口单招分数线公布 江苏省对口单招省控线出炉...
  14. Python之pandas库(万年一更版)
  15. 迪威视讯打造全国网格化管理样板 龙华“织网工程”
  16. maven查找依赖的方法
  17. 日记--javascriptApache Echarts
  18. 程序员面试金典总结 - leetcode 程序员面试金典系列
  19. ngrok实现内网穿透,让家里的笔记本也能做服务器
  20. Activiti6.0流程引擎学习——(11)使用IDEA编码实现的请假流程

热门文章

  1. Win2k-XP超级加速脚本.cmd
  2. 根据卡号获取银行卡名字
  3. Java中Synchronized的用法
  4. 吵架记-2020年6月22日16:47:45
  5. Android Stadio 导入Android 源码不停index
  6. Android获取状态栏的高度:
  7. Ubuntu中Vim 中文乱码解决方法
  8. 从HarmonyOS应用到底是不是Android套壳?
  9. [java语言]——InetAddress类的getByName()方法
  10. android 自定义键盘_Android自定义输入车牌号键盘、车牌简称,数字 ,字母键盘...