无法在线打开GitHub上的git子模块文件夹

aemubtdh  于 5个月前  发布在  Git
关注(0)|答案(1)|浏览(37)

我最近添加了this github repo作为我的项目repo中的子模块。我无法在我的项目repo here中打开repo的根文件夹。我看了this的答案,它说名称和提交哈希都应该显示为链接,但对我来说似乎不是这样。我直接将子模块repo克隆到我的项目中,所以我不得不先做git rm --cached catkin_ws/src/turtlebot3_simulations/,然后执行git submodule add https://github.com/ROBOTIS-GIT/turtlebot3_simulations/tree/noetic-devel catkin_ws/src/turtlebot3_simulations/来添加子模块。这是我第一次使用子模块,我不知道我做错了什么。寻找任何关于我做错了什么的提示,什么是正确的方法来解决这个问题。谢谢!

ukqbszuj

ukqbszuj1#

https://github.com/ROBOTIS-GIT/turtlebot3_simulations/tree/noetic-devel不是仓库,因此不能作为子模块添加。它是repo https://github.com/ROBOTIS-GIT/turtlebot3_simulations中的一个分支noetic-devel。要修复您的问题,请删 debugging 误的子模块并重新添加正确的子模块:

git submodule deinit -f -- catkin_ws/src/turtlebot3_simulations/
git rm --cached catkin_ws/src/turtlebot3_simulations/
git submodule add -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3_simulations catkin_ws/src/turtlebot3_simulations/

字符串

相关问题