Note that there are some explanatory texts on larger screens.

plurals
  1. POGit submodules workflow
    text
    copied!<p>In my project I need to use third party code, stored in several Git repositories. My project is also stored in (separate) Git repository. There are several people working with me on the main project, and I'm the maintainer.</p> <p>In earlier projects I used to copy dependencies manually to the Git working tree, adding a little file specifying version I use.</p> <p>Now this is rather uncomfortable since I need to update daily one of dependencies, and often contribute code to it myself, most of the time coupled with changes into the main project.</p> <p>I've decided to try Git submodules to do the management. The more I try them, the more frustrated I become. It even seems that manual copy is, perhaps, better.</p> <p>Here are some of my concerns:</p> <ul> <li>We're no longer able to get consistent repository state with a single command (<code>git checkout</code> now needs <code>git submodule update --init</code>). </li> <li>We're not able to use some of the Git tools properly (<code>git archive</code> is the most notable).</li> <li>We're not able to see the status changes / diffs into submodules from the main project.</li> <li>As I've just found in a hard way, <code>git submodule</code> does not work with <code>--git-dir</code> and <code>--work-tree</code> options, and require physical change of current directory to the "toplevel of the working tree". </li> </ul> <p>It seems that in order to streamline our submodules workflow (that is one operation == one command) we have to write a rather thick wrapper around Git. This is sad.</p> <p>Note that it is not an option to move away from Git or to merge subproject development entirely into the main project.</p> <p>Perhaps I'm using <code>git submodules</code> in a wrong way? Is there any good tutorial on the workflow?</p> <p>Please speak up even if you don't know the proper answer, but do share my concerns. :-)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload