bash: git: command not found

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

$ git bash: git: command not found

解决办法

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

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

bash 复制代码
%userprofile%
相关推荐
BerryS3N4 小时前
Code Git 工作树:多分支开发的痛点与工作树的曙光
大数据·git·elasticsearch
lbb 小魔仙7 小时前
Git + Python 项目工作流最佳实践:pre-commit、CI、CHANGELOG 自动化
git·python·ci/cd
光年像素10 小时前
Windows Win+R 运行框常用快捷命令大全
windows
Xu_youyaxianshen11 小时前
Git 零基础常用指令手册(Gitee / GitHub 通用 )
git·gitee·github
寒水馨11 小时前
Windows下载、安装ollama-v0.32.1(附安装包OllamaSetup.exe)
windows·llm·大语言模型·llama·本地部署·ollama·模型运行
曾阿伦12 小时前
Windows 下运行 Hadoop 并部署到 AWS EMR 指南
hadoop·windows·aws
小飞侠在吗12 小时前
【MySQL 排错】Navicat 连接 localhost 报 2002 (10061) 完整排查记录(Windows + MySQL 8.4 用户模式)
windows·mysql·adb
John_ToDebug12 小时前
Git Stash 完全指南:临时保存工作区的艺术
人工智能·git·agent
王维同学13 小时前
[原创][Windows C++]Explorer Shell 扩展、图标覆盖与 COM 服务器定位
c++·windows·注册表
圣殿骑士-Khtangc13 小时前
WSL2 + Redis Stack 完整部署教程(Windows 11)
windows·redis·wsl