tags:

views:

24

answers:

1

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 repository if there's an alternative.

+1  A: 

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.

Jess Bowers