How to fix changes in git submodules?
I have added submodule to my project, I have added my file to it, then I have done commit. What I have to do now? I can’t push changes because that submodule repository is not my, I haven’t password from it, etc. Is it possible to push changes in submodule to my server?
One Solution collect form web for “How to fix changes in git submodules?”
You can’t update submodule source on server by simple push. Possible way to do this:
- fork your submodule project (if license allow it)
- push in that fork your changes
update submodule url to new fork repository.You can do this by editing
[submodule "lib/Example"] path = lib/Example url = ../Example.git # <-- here insert link to your fork
Doing this in future you must update your fork manually, periodically doing pulls from upstream (original submodule project) repository
- finally do
git submodule update