bash: git: command not found

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

$ git bash: git: command not found

解决办法

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

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

bash 复制代码
%userprofile%
相关推荐
码力斜杠哥44 分钟前
Git的说明及基本使用
git
摆烂且佛系1 小时前
git reset 与 git revert 区别
git
Goldbioinformatics3 小时前
Windows版Claude Cowork启动Linux问题
linux·运维·windows
xiaoshuaishuai84 小时前
C# CDN加速与离线包优化PowerSetting慢问题
开发语言·windows·spring·c#
韭菜钟4 小时前
Windows下,在Github Copilot Chat/CLI中使用obra/superpowers
windows·github·copilot
love530love5 小时前
ComfyUI MediaPipe 猴子补丁终极完善版:补全上下文管理与姿态检测兼容
人工智能·windows·python·comfyui·protobuf·mediapipe
Gavin_9155 小时前
“操作无法完成,因为其中的文件夹或文件已在另一程序中打开”解决方案
windows·重命名·文件夹
郭龙飞9806 小时前
OpenClaw 飞书机器人搭建指南 远程 AI 操控电脑配置
人工智能·windows·机器人·飞书
向日的葵0067 小时前
大模型之git操作(第五章)
git
有味道的男人8 小时前
1688 商品价格 API:阶梯价、代发价、批发价实时查询
开发语言·windows·python