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?

  • Problem pushing to Heroku with dm-migrations
  • How do I make a git hook for modifying then mirroring a git repository?
  • Git confusion - how to revert local changes to latest remote push?
  • Upload a folder with more than one app to github with git
  • How to delete remotes/origin/{branch}?
  • Why can't Bundler locate this gem?
  • Git Revert Error Message?
  • SSH hangs at “SSH2_MSG_SERVICE_ACCEPT received” or “SSH2_MSG_NEWKEYS received”
  • Old Source Code into New Repository
  • Why is .gitignore not part of repository by default?
  • How do I export every commit in git into its own numbered archive?
  • Using `git --git-dir /path/to/git pull /path/to/other/bare-git master` doesn't automatically update the working tree. Why not?
  • 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:

    1. fork your submodule project (if license allow it)
    2. push in that fork your changes
    3. update submodule url to new fork repository.You can do this by editing .gitmodules file:

      [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

    4. finally do git submodule update
    Git Baby is a git and github fan, let's start git clone.