当你在使用 Git 命令时遇到 fatal: not in a git directory 错误,这通常意味着你当前所在的目录不是一个 Git 仓库,或者 Git 无法在当前目录下找到 .git 目录(这是 Git 仓库的标识)。下面我将根据提示逐步解答你的问题: 1. 确认当前所在目录 首先,你需要确认你当前所在的目录。你可以使用 pwd(在 Unix/Linux...
先打开Git Bash所在的文件夹 双击打开git-cmd.exe 先输git config –global user.email "你的邮箱号" 再输git config –global user.name "账号名" 分别回车后即可解决not in a git directory问题 成功添加账号和邮箱 切记一定要先在cmd中先输入邮箱再输入账号,否则依旧会报错 结语:实质上第一次报错是因为目录...
执行下面语句时报错: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 ...
如何解决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 xxx git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core git config --global --add …
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...
为何在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 ...
git解决fatal:notinagitdirectory git解决fatal:notinagitdirectory git解决 fatal: not in a git directory 问题描述:执⾏下⾯语句时报错:fatal: not in a git directory git config --global user.name "yourName" //注意,--和global之间没有空格 git config --global user.email "yourName@gmail....