bash: git: command not found

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

$ git bash: git: command not found

解决办法

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

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

bash 复制代码
%userprofile%
相关推荐
小涛不学习6 小时前
手写线程池(从0实现 ThreadPoolExecutor 核心思想)
windows
twc8297 小时前
大模型生成 QA Pairs 提升 RAG 应用测试效率的实践
服务器·数据库·人工智能·windows·rag·大模型测试
wenlonglanying8 小时前
Windows安装Rust环境(详细教程)
开发语言·windows·rust
悠然大月季9 小时前
git 怎么导出提交历史,文件是乱码
git·git导出历史记录·git导出历史乱码
polaris06309 小时前
Windows操作系统部署Tomcat详细讲解
java·windows·tomcat
mldlds10 小时前
windows手动配置IP地址与DNS服务器以及netsh端口转发
服务器·windows·tcp/ip
取个名字太难了a10 小时前
DebugActiveProcess 调试流程分析(一)
windows
chenshiming80210 小时前
在cursor下执行GIT回退版本
git
Java.熵减码农10 小时前
火绒安全软件误杀explorer.exe导致黑屏解决方法
windows
love530love11 小时前
不用聊天软件 OpenClaw 手机浏览器远程访问控制:Tailscale 配置、设备配对与常见问题全解
人工智能·windows·python·智能手机·tailscale·openclaw·远程访问控制