I'm trying to make our internal plugins easier to be re-used across multiple projects utilizing Git and its Submodules.
Right now, a UE Project, being its own Repo, would add a UE Plugin, which is also its own Repo, as a submodule.
Submodules can be added while tracking a specific branch, so the idea is to have a branch per Engine version and to point to the specific branch based on the Engine version of the project. That should allow pushing Binaries to the Plugin Repo based on the branch.
Both Project and Plugin are tracking Binaries in general, which programmers have set to ignore in their own global gitignore. That's to support non-programmers who can't build their own Binaries. The Binaries for them are build by a build machine and pushed whenever there is a change to the /Source folder.
For only the Project, this works just fine. For the submodule setup, this becomes a bit of a pain. The idea is that modifications to the Plugin can instantly be pulled into all projects that use it. I read that a simple git submodule update --recursive --remote would cause them to update, but also lead to a detached HEAD. Not really sure why, as that goes a bit of my own head.
Another problem is that, I think, git pull doesn't automatically take submodules into account, and our non-programmers use a client to pull their changes with. They don't really know how to use the command line stuff for git and I also don't want them to learn that.
Is there anyone who has something like this set up in a way that:
- git pull updates the project and the submodules
- Changes to the submodule can be pushed from within the submodule (that's easy enough I guess)
- Updating the submodule does not detach the HEAD
- Binaries are properly synced for non-programmers
I feel like my setup is close, but also has a bunch of hiccups that are annoying.