git add .报错warning: adding embedded git repository: carreport hint: You‘ve added another git...

这篇具有很好参考价值的文章主要介绍了git add .报错warning: adding embedded git repository: carreport hint: You‘ve added another git...。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

git add . 时报错

  • $ git add .
warning: adding embedded git repository:xxxxxxxxxx
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url>xxxxxxxxxx
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached   xxxx
hint:
hint: See "git help submodule" for more information.

原因:
使用 git add . 时,出现上述错误。是因为在当前 git 仓库中同时包含有另一个git仓库。如当前仓库目录下的子文件夹内又是一个仓库。

解决:
删除子文件夹的.git文件, 重新add commit push文章来源地址https://www.toymoban.com/news/detail-801792.html

到了这里,关于git add .报错warning: adding embedded git repository: carreport hint: You‘ve added another git...的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • IDEA git报错 unsafe repository解决方法

    闲来无事,更新Git,打开IDEA一看统统报错,百度半天大多都会给你说用git config --global --add safe.directory, git添加了新的目录安全限制,只需要打开你的用 管理员身份运行cmd ,跳转到项目目录输入 如果不行尝试 方法1:git config --global --add safe.directory \\\"*\\\" 方法2:文件目录-右键

    2024年02月03日
    浏览(24)
  • git报错:Reinitialized existing Git repository in ...解决方法

    初始化git项目时,报错 Reinitialized existing Git repository in… 该路径中已经存在.git文件了 可以在当前文件下的控制台中输入 ls-a 查看,有.git 的话,使用 rm -rf .git 删除之后重新初始化就可以了

    2024年02月11日
    浏览(28)
  • Warning: Permanently added ‘github.com’ (ED25519) to the list of known hosts. git@github.com

    解决:Warning: Permanently added ‘github.com’ (ED25519) to the list of known hosts. git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. 原因 :GitHub SSH秘钥不对 0. 检查本地是否有 id_rsa、id_rsa.pub 密匙 项目根目录下,输入命令 ls ~/.ssh (大概率没有以上两个文件,而只出现

    2024年02月03日
    浏览(36)
  • [git]报错fatal: ‘origin‘ does not appear to be a git repository Could not read from remote repository

    问题1:   fatal: \\\'origin\\\' does not appear to be a git repository fatal: Could not read from remote repository. 说明库是有的,但是没办法push。所以重新关联一下。 解决方法: 输入以下代码, 这是因为本地的分支没有和远程分支建立联系,需要执行以下代码就可以正常 push 了   问题2:   fatal:

    2024年02月09日
    浏览(36)
  • git报错fatal: detected dubious ownership in repository at

    在git上执行 git branch fatal: detected dubious ownership in repository at ‘/home/你的用户名/cam/code’ To add an exception for this directory, call: 这个一般是权限不足导致的,有两种解决方式: 1.sudo su进入到root权限 然后输入你的密码 2.这个错误提示表明在您的Git仓库中发现了一个可疑的文件夹,

    2024年01月17日
    浏览(30)
  • IDEA Git 报错could not read from remote repository

    Git:could not read from remote repository。 首先再git后台,检查是否有对应工程的权限 1  检查idea工程project目录下的.git文件夹下的.config文件,origin配置是否正确 打开.config文件,url有两种方式:https的方式、ssh的方式, 检查对应的url是否正确 2 如果正确,请配置ssh 密钥,网上随便

    2024年02月08日
    浏览(28)
  • 运行报错(三)git bash报错fatal: detected dubious ownership in repository at

    在运行git 命令时,出现报错 “fatal: detected dubious ownership in repository at” 文件夹的所有者和现在的用户不一致 栗子: 文件夹的所有者是root,而当前用户是admin 方法一、 将文件夹的所有者 替换 成admin 将文件夹的所有者 添加 admin sudo -S setfacl -R -m u:switch_git:rwx ./ 方法二、 在g

    2024年02月05日
    浏览(31)
  • git pull 报错 could not read from remote repository解决

    git pull 报错 remote: Your account has been blocked. fatal: could not read from remote repository。一般是SSH的形式clone的仓库,权限被更改了。 如下步骤解决: 重新 生成 gitLabKey 并应用:                  step 1:     使用命令 ssh-keygen -t rsa -b 2048 -C \\\"lvl@svtc.com\\\"                  step 2:     出现

    2024年02月16日
    浏览(24)
  • 解决Git报错:fatal: detected dubious ownership in repository at

    在通过 Git Bash 提交项目代码时输入 git add . 命令后,报错:fatal: detected dubious ownership in repository at 这是因为该项目的所有者与现在的用户不一致 比如说: 该项目的所有者是 Administrator,而当前用户是 qiuye, 那么就会导致上面的错误 解决的办法也很简单在 git bash 中输入

    2024年03月19日
    浏览(40)
  • 完美解决 git 报错fatal: Not a git repository (or any of the parent directories): .git

    错误提示是找不到.git文件,无法执行git指令,意思是 当前你要提交的文件夹中没有.git这个文件 执行如下命令:

    2024年03月15日
    浏览(31)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包