开发者

Tracking changes in submodules

开发者 https://www.devze.com 2023-01-04 16:12 出处:网络
Is there any way to store changes made to submodules in the parent repository? I\'m using a library which I have modified very slightly (just a couple lines of code modified). I\'d rather not check th

Is there any way to store changes made to submodules in the parent repository? I'm using a library which I have modified very slightly (just a couple lines of code modified). I'd rather not check the entire library into my repo开发者_如何学运维sitory if there's an alternative.


Changes to submodules can be checked in locally within the submodule's repository. They're not required to be pushed back to the original location of the submodule. However, if you are sharing your parent project externally to your team, you'll need to make the submodule changes publicly visible.

Example:

  • local repository "foo"
  • submodule within foo called "bar"
  • make changes within bar, ideally within a new branch
  • commit those changes locally within bar
  • commit foo locally

So long as you're not sharing this repository externally, this is fine. Otherwise, you'll have to push the changes to the submodule, so that other team members can see your changes to the submodule.

0

精彩评论

暂无评论...
验证码 换一张
取 消