bash: git: command not found

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

$ git bash: git: command not found

解决办法

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

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

bash 复制代码
%userprofile%
相关推荐
袋子(PJ)44 分钟前
2026最新GitHub发布项目全过程
git·github
海 月1 小时前
adb install 右键快捷菜单
windows
rosemary5121 小时前
Windows vscode Claude Code + DeepSeek V4
ide·windows·vscode·claude code·deepseek-v4-pro
2601_961194021 小时前
化学教资科三真题答案
linux·windows·ubuntu·pdf·centos·gnu
许彰午1 小时前
Git实战——从零到团队协作以一个开源项目为例
git·开源
言6661 小时前
要忽略ider的文件在目录下 git暂存区消失
git
‎ദ്ദിᵔ.˛.ᵔ₎2 小时前
Git使用
git
Fly feng2 小时前
windows pnp/power status Manager(设备 电源状态介绍)
windows·pnp/power
元Y亨H2 小时前
Windows蓝屏错误0x00000124 (硬件错误) 完整排查笔记
windows
曲幽2 小时前
你的FastAPI又在服务器上“跑不起来”了?来,今天咱把打包这件事彻底聊透
linux·windows·python·docker·fastapi·web·pyinstaller·nssm·services