bash: git: command not found

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

$ git bash: git: command not found

解决办法

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

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

bash 复制代码
%userprofile%
相关推荐
netyeaxi3 小时前
Git:git深入理解及常见问题
git
Blockbuater_drug5 小时前
Dify 1.18 本地部署实战:Windows + WSL2 + Docker,从零跑到本地可用
windows·docker·容器·dify·大模型应用平台
蹊黎5 小时前
Git 从入门到精通(二):创建本地仓库与三大核心区域
git
cc_yy_zh6 小时前
笔记本关机自动重启解决办法
windows
蹊黎7 小时前
Git 从入门到精通(一):初识 Git 与环境搭建
git
AlanAshley9 小时前
Windows 错误代码 0x80284018:可能原因与解决办法
windows
2501_9159090610 小时前
Windows 打开 Xcode 工程,编译调试 Xcode 项目并和 Mac 同事协作
ide·windows·vscode·macos·ios·个人开发·xcode
vortex511 小时前
Windows Server IIS 运维配置指南:架构、身份、安全与排障
运维·windows·架构
如若1231 天前
Windows SSH + Headscale/Tailscale 组网及免密登录完整配置教程
运维·windows·ubuntu·ssh·内网穿透
゛凌乱的记忆づ1 天前
好用的md文件编辑器——TyporaS与Typora
笔记·git·typora·markdown