当前位置:   article > 正文

git添加文件到码云gitee或者GitHub的时候出现警告warning: adding embedded git repository:_warning: adding embedded git repository: spoon-kni

warning: adding embedded git repository: spoon-knife hint: you've added anot

问题描述

(base) pi@pi:~$ git add demo_ws demo02_ws demo03_ws
warning: adding embedded git repository: demo03_ws/src/urdf01_rviz/meshes/sim_demo
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> demo03_ws/src/urdf01_rviz/meshes/sim_demo
hint: 
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint: 
hint: 	git rm --cached demo03_ws/src/urdf01_rviz/meshes/sim_demo
hint: 
hint: See "git help submodule" for more information.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15

出现这个的原因是因为在警告冒号后面的文件夹中也有.git文件夹,所以会出现这个警告。

解决方法

很简答,直接根据警告的路径,打开相应的文件夹,按住ctrl + h显示.git文件夹,然后把它删掉就可以了

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/596733
推荐阅读
相关标签
  

闽ICP备14008679号