Force Git submodules to always stay current

前端 未结 4 1166
悲哀的现实
悲哀的现实 2020-12-07 18:40

I love git submodules. Also, I hate git submodules. What I love about them is how it enables to you to cleanly compartmentalize dependencies etc. I get the point of havin

4条回答
  •  太阳男子
    2020-12-07 18:50

    Why don't you make changes inside the submodule directory, which itself is a git repo? This way, your app will always have updated library.

    Caveats:

    1. You still need to commit the submodule change inside your app repo to put the change in version control (for the app).

    2. If there are more apps than one that are using this library, than this is not going to work, since only one app will be up-to-date at any given time.

提交回复
热议问题