bash: git: command not found

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

$ git bash: git: command not found

解决办法

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

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

bash 复制代码
%userprofile%
相关推荐
Unity粉末状在校生6 小时前
Git解决fatal: Could not read from remote repository.的问题
git
少年攻城狮7 小时前
Obsidian系列---【如何使用obsidian同步到git?】
git
韭菜钟7 小时前
WIndows下一键切换网卡IP脚本
windows·网络协议·tcp/ip
Dontla8 小时前
go语言Windows安装教程(安装go安装Golang安装)(GOPATH、Go Modules)
开发语言·windows·golang
do better myself9 小时前
网站源码如何部署和加入GIT仓库的
git
liliangcsdn11 小时前
mstsc不在“C:\Windows\System32“下在C:\windows\WinSxS\anmd64xxx“问题分析
开发语言·windows
低频电磁之道11 小时前
解决 Windows C++ DLL 导出类不可见的编译错误
c++·windows
爱学英语的程序员12 小时前
Git 提交 LF will be replaced by CRLF the next time Git touches it 报错
git
qq_3391911412 小时前
服务器git pull每次都要输入密码,linux 设置git登录,linux设置git只输入一次账户密码
git
IDC02-阿杰13 小时前
Windows WSL2安装Ubuntu24.04全攻略
linux·windows