我最近在我的專案 repo 中添加了這個github repo 作為子模塊。我不能在我的專案打開回購的根檔案夾回購這里。我查看了這個答案,它說名稱和提交哈希都應顯示為鏈接,但對我來說似乎并非如此。我直接將子模塊 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/才能添加子模塊。這是我第一次使用子模塊,我不確定我做錯了什么。尋找有關我做錯了什么以及解決此問題的正確方法的任何提示。謝謝!
uj5u.com熱心網友回復:
https://github.com/ROBOTIS-GIT/turtlebot3_simulations/tree/noetic-devel不是存盤庫,因此不能作為子模塊添加。這是noetic-develrepo https://github.com/ROBOTIS-GIT/turtlebot3_simulations 中的一個分支。要解決您的問題,請洗掉錯誤的子模塊并重新添加正確的子模塊:
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/
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/398256.html
上一篇:GitHub存盤庫中的貢獻者
