如何在github中访问子模块的内容?

时间:2016-07-24 15:28:14

标签: github

我不知道如何,但我以某种方式将文件转换为子模块。所以现在我无法在Github中查看它。如何撤消此操作,以使文件再次可单击?

(我已经阅读了stackoverflow中类似问题的答案,对我来说它们没有多大意义......我对git很新)

1 个答案:

答案 0 :(得分:0)

您需要revert to a past commit where that file was not a submodule

git log path/to/file
git checkout <past_commit> -- path/to/file

或者您可以删除该条目并恢复该文件,添加并再次提交。

git rm -- path/to/file
# copy the file
git add -- path/to/file
git commit -m "restore file"
相关问题