bash: git: command not found

在windows上重新安装Git之后,遇到cmd可以使用git命令,但是git bash中使用的git命令的时候,会提示:

$ git bash: git: command not found

解决办法

找到用户目录下的.bash_profile和.bashrc文件,编辑打开,找到里面不正确的文件路径,将其删除就好了。

如何找到快速进入到用户目录下:打开cmd允许对话框,输入以下命令。

bash 复制代码
%userprofile%
相关推荐
不总是1 天前
Windows 系统 Node.js 免安装版(zip)安装与配置教程(2026 最新)
前端·windows·node.js
Ws_1 天前
Git + Gerrit 第二课:diff、暂存区与撤销修改
git
snowjlz1 天前
鸿蒙版SVN来了!!!
git·svn·版本控制
不总是1 天前
[2026最新] Windows 免安装版 MySQL 8 详细安装配置教程(ZIP 压缩包版)
数据库·windows·mysql
2401_876964131 天前
27考研余炳森概率论|喻老李良2027资料网课
windows·git·考研·svn·eclipse·github·概率论
介一安全1 天前
【漏洞学习】PHP+Windows环境通用文件上传漏洞深度剖析
windows·web安全·php·文件上传·安全性测试
思麟呀1 天前
C++工业级日志项目(六)异步日志器
linux·c++·windows
爱搬砖的狮子1 天前
【Git】git repo下载使用
git
fastjson_1 天前
Win11 关闭拖动窗口自动出现的贴靠窗口分栏
windows
早睡身体真不戳1 天前
【无标题】
java·服务器·windows