git commit and push submodules

2020-08-20  本文已影响0人  fred_33c7

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
上一篇 下一篇

猜你喜欢

热点阅读