首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >添加git文件夹,添加不工作的白箭头

添加git文件夹,添加不工作的白箭头
EN

Stack Overflow用户
提问于 2020-12-03 07:26:44
回答 1查看 211关注 0票数 2

我已经阅读了一些关于堆栈溢出的其他文章,并意识到了这个问题,但是,如何解决这个问题呢?我试过:git rm --cached client_folder,但是我得到了错误信息:我也遇到了同样的问题:

代码语言:javascript
复制
Reinitialized existing Git repository in /Users/user/Desktop/final-8/.git/
User@User final-8 % git add client
warning: adding embedded git repository: client
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> client
hint: 
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint: 
hint:   git rm --cached client
hint: 
hint: See "git help submodule" for more information.

我该怎么解决这个问题?我试过了:git rm --cached client_folder,但是去看下面的错误消息:

代码语言:javascript
复制
git rm --cached client

error: the following file has staged content different from both the
file and the HEAD:
    client
(use -f to force removal)

编辑我运行了git rm --cached -f client,这就是我得到的:

代码语言:javascript
复制
User final-8 % git rm --cached -f client 
**rm 'client'** 
User final-8 % git init 
Reinitialized existing Git repository in /Users//Desktop/final-8/.git/ 
User final-8 % git add client 
warning: adding embedded git repository: client 
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. 

我又试了一次,现在我得到了:

代码语言:javascript
复制
client % git rm --cached -f client
fatal: pathspec 'client' did not match any files
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-12-03 07:30:41

最后一行实际上是在您的-f命令上打开git rm选项的指示:

代码语言:javascript
复制
git rm --cached -f client
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65121516

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档