Search code examples
gitgit-submodules

Git submodule created by other team member


I have added a submodule and checked in this submodule fully, I have then checked in my master project.

Now my team mate who had checked out the master project before i added a submodule only gets an empty folder for the submodule.

he can do recursive checkout of master project and get submodule. But we don't want a new checkout because he has changes, so we simply want the submodule to show up in his project as well.


Solution

  • My thought is that he could git stash save his changes, do a recursive checkout to get the changes and then git stash pop to keep going.

    I would test this out first to make sure it works how you expect it too.