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 小时前
分享5款满足各类需求的小软件
windows
惜__缘1 小时前
Git项目迁移的坑点
git
积跬步,慕至千里2 小时前
AI平台Dataiku 支Windows系统安装过程总结
windows
FL16238631292 小时前
[C++][cmake]基于C++在windows上部署yolo26的目标检测onnx模型
c++·windows·目标检测
阿杰 AJie3 小时前
Git 分支与多人开发使用指南(Gitee + 本地 Git)
git·elasticsearch·gitee
论迹3 小时前
【Git】-- 解决git branch -a打印已被删除的远程分支
git
WellTung_6665 小时前
Windows opencode Desktop App配置 Azure GPT5.2和oh-my-opencode插件安装方法
windows·azure
椰汁菠萝5 小时前
VSCode中设置git提交按钮为“提交和推送”
git·vscode·自动推送
Bruce_Liuxiaowei5 小时前
如何彻底禁用 Windows Defender(附安全模式终极方案)
windows·安全·网络安全·内网渗透