先输git config –global user.email "你的邮箱号" 再输git config –global user.name "账号名" 分别回车后即可解决not in a git directory问题 成功添加账号和邮箱 切记一定要先在cmd中先输入邮箱再输入账号,否则依旧会报错 结语:实质上第一次报错是因为目录结构不对,Git Bash图中顶上的 MINGW64 ~ 是系统...
在Git中遇到“not in a git directory”的错误提示,通常意味着你当前所在的目录不是一个Git仓库的根目录或其子目录。这里有几个步骤和建议来帮助你处理这个问题: 1. 确认当前目录是否为Git仓库 首先,你需要确认当前目录是否真的是一个Git仓库。你可以通过运行Git命令来检查这一点。 打开你的命令行工具(如Terminal...
执行下面语句时报错:fatal: not in a git directory git config --global user.name "yourName" //注意,--和global之间没有空格 git config --global user.email "yourName@gmail.com" 先进入git目录,或使用 git init 新建一个 Git 仓库。 然后再执行即可。 如果报错: error :key does not contain a se...
fatal: not in a git directory 或 fatal: --local can only be used inside a git repository 其实是没有操作权限,使用管理员打开 cmd 或者 powershell 就不报错了。
· Mac系统使用homebrew安装组件时报错--fatal: not in a git directory Error: Command failed with exit 128: git · mac 使用 brew安装包报错 fatal: not in a git directory,Error: Command failed with exit 128: git · 6、Mac下使用brew安装Git时报错Error: Command failed with exit 128: git ...
在百度找了一大堆 最后找到了这个解决方案 非常好使 解决 Mac brew install xxx git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core git config --global --add …
如何解决Homebrew安装过程中的fatal: not in a git directory错误? Homebrew安装失败是否与git版本有关? 问题描述 解决方法一 添加安全目录,没有测试。 代码语言:javascript 代码运行次数:0 运行 AI代码解释 git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew- git config --...
为何在Mac上使用brew install会遇到fatal: not in a git directory的问题? 1.执行 brew install xxx 命令报错 代码语言:shell AI代码解释 fatal: unsafe repository ('/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask' is owned by someone else) To add an exception for this directory, call: git ...
fatal: not in a git directory Error: Command failed with exit 128: git 二、解决方法 使用brew -v,仔细看,可以发现有两个fatal(致命错误)提示: 解决方法就在提示中,根据提示,分别执行下面两个命令: git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-core git confi...
老师,问下为啥我输入git用户名提示 not in a git directory写回答 关注 1回答 后知后觉3971623 2019-05-25 14:47:09 如果设置的本地username 需要先Git init 0 0 VSCode入门 学习前端开发工具VSCode的基本使用方法。 38665 学习 · 58 问题 查看课程 ...