bash: git: command not found

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

$ git bash: git: command not found

解决办法

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

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

bash 复制代码
%userprofile%
相关推荐
埃博拉酱2 天前
VS Code Remote SSH 连接 Windows 服务器卡在"下载 VS Code 服务器":prcdn DNS 解析失败的诊断与 BITS 断点续传
windows·ssh·visual studio code
Bigger2 天前
为什么你的 Git 提交需要签名?—— Git Commit Signing 完全指南
git·开源·github
唐宋元明清21882 天前
.NET 本地Db数据库-技术方案选型
windows·c#
DianSan_ERP2 天前
电商API接口全链路监控:构建坚不可摧的线上运维防线
大数据·运维·网络·人工智能·git·servlet
加号32 天前
windows系统下mysql多源数据库同步部署
数据库·windows·mysql
tryCbest2 天前
Windows环境下配置pip镜像源
windows·pip
呉師傅2 天前
火狐浏览器报错配置文件缺失如何解决#操作技巧#
运维·网络·windows·电脑
百事牛科技2 天前
保护文档安全:PDF限制功能详解与实操
windows·pdf
一个人旅程~2 天前
如何用命令行把win10/win11设置为长期暂停更新?
linux·windows·经验分享·电脑
一个假的前端男2 天前
[特殊字符] Flutter 安装完整指南 Windows—— 2026最新版
windows·flutter