Here is the current setup. I have a:
- Central Git repository (origin) on a network drive
- Working copy on my local hard drive
- Repository on the web server to deploy project to
I use a submodule to pull in a framework that is hosted on GitHub. My understanding is that when I add a subdmodule to my repository, it downloads the repository from GitHub to my local working directory, where I can then checkout the desired version, and ultimately push to the origin.
When I commit the code to the origin repository, does it push a copy of the framework as well, or does it only, for lack of a better word, store a reference/pointer to the remote repository?
I ask because I would like to create a few repositories of third-party tools that I often use with this framework (currently not managed with Git), so that I can easily pull them into the projects that need them. The goal is to then update my local, third-party repositories whenever needed and update the individual projects with a newer version.
The way I deploy my projects is by pushing them to the web server, which will then deploy the application using the post-receive
hook. The potential problem might be that if Git doesn't push the submodule itself and only a pointer, which I think is the case, because that's what git submodule init && git submodule update
is for, the web server will have no way of getting a copy of the submodule's contents.
The easiest solution I can think of would be to simply host those third-party tools using a public-facing service like GitHub or Bitbucket, but I'm wondering if there's another way?