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 小时前
git仓库本地化
git
naruto2271 小时前
Git推送时间修改
git
解道Jdon3 小时前
VSCode 2026年2月更新:技能市场、CLI、钩子支持
ide·windows·git·svn·eclipse·github·visual studio
love530love3 小时前
Windows 11 源码编译 vLLM 0.16 完全指南(RTX 3090 / CUDA 12.8 / PyTorch 2.7.1)
人工智能·pytorch·windows·python·深度学习·vllm·vs 2022
linuxxx1103 小时前
让openclaw使用系统命令:“rm“, “mkdir“, “touch“, “ls“, “cat“, “echo“
linux·服务器·windows
北极糊的狐3 小时前
Windows电脑能播放rmvb格式视频的软件,以及下载地址
windows·音视频
1nullptr3 小时前
Windows 10 文件名大小写敏感设置
windows
悲伤小伞3 小时前
Git_原理及使用_修改文件_版本回退
linux·服务器·git
林鸿群3 小时前
Git 实战:如何将本地 .NET 项目推送到 GitLab 私有仓库
git·gitlab·.net
刘一说3 小时前
Git 工具知识全景图:从核心概念到高效协作实践
大数据·git·elasticsearch