美文网首页
git commit and push submodules

git commit and push submodules

作者: fred_33c7 | 来源:发表于2020-08-20 14:15 被阅读0次

https://stackoverflow.com/a/5542964

A submodule is its own repo/work-area, with its own .git directory.

So, first commit/push your submodule's changes:

$ cd path/to/submodule
$ git add <stuff>
$ git commit -m "comment"
$ git push

Then, update your main project to track the updated version of the submodule:

$ cd /main/project
$ git add path/to/submodule
$ git commit -m "updated my submodule"
$ git push

相关文章

网友评论

      本文标题:git commit and push submodules

      本文链接:https://www.haomeiwen.com/subject/tvisjktx.html