bash: git: command not found

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

$ git bash: git: command not found

解决办法

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

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

bash 复制代码
%userprofile%
相关推荐
爱学习的小白柏3 小时前
【AI问数技术】多Agent协同架构:查询规划/SQL生成/洞察分析/报告生成
java·网络·人工智能·windows·sql·架构·llama
何以解忧,唯有..7 小时前
Python 中获取目录操作完全指南
windows·python·microsoft
Aurora_th8 小时前
浙江海洋大学 资料共享 期末考试卷、课程资料等
git·github
YCOSA202510 小时前
雨晨 Windows 10 轻装版 64位 六合一 VIP 19045.7663
windows·物联网
奶茶树11 小时前
【C++】13. C++11新特性【上】
c语言·开发语言·c++·git·github
DOLA_Tech14 小时前
电脑共享文件夹教程(Windows、统信UOS、银河麒麟)
windows·电脑
淡海水14 小时前
03-03-线性-LinkedList-T-源码不变式与选择边界
windows·链表·c#·编译·linkedlist·clr·机器码
钝挫力PROGRAMER15 小时前
Windows Docker 环境搭建 GitLab CI/CD 流水线
windows·docker·gitlab·gitlab-runner
拿本唠嗑AI研究16 小时前
从电脑到手机:DeepSeek Harness Windows安装与手机互动教程(避坑完全版)
人工智能·windows·智能手机·deepseek·harness
夏至春来-美美1 天前
git clone报错
git