首页 > 解决方案 > 如何处理此消息“您已在当前存储库中添加了另一个 git 存储库。”

问题描述

发生的事情是我昨天在 git 上合并了代码,我意识到代码已经构建好了。所以我恢复到以前的 git log 并修复它(没有构建,更新一些代码)

现在当我试图git add.

我收到了这条消息

warning: adding embedded git repository: Carebnb
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> Carebnb
hint: 
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint: 
hint:   git rm --cached Carebnb
hint: 
hint: See "git help submodule" for more information

我不知道为什么 git recoginze 我试图子模块它..

我想要的只是推送 github ..!

+ 发生的事情是我的代码与 Carebnb 存储库链接,但合并不起作用,所以我创建了新的 hotel_app 存储库和链接!之后我恢复了 Carebnb 存储库,现在当我 git add 它有这些消息

标签: gitgithubbuildgit-revert

解决方案


推荐阅读