Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Use either git subtrees or git submodules.</p> <p>Last time I've checked, submodules had some major issues (but I've heard that they were improved a bit in recent versions). See here for details: <a href="https://stackoverflow.com/questions/1596822/git-submodules-workflow">Git submodules workflow</a></p> <p>In short:</p> <p><strong>Subtrees</strong> are regular Git <em>branches</em>, merged with special merge strategy, which puts all their files into a subdirectory of the host repository working copy. Aside of the merge strategy (which matters only when merge commit is created), Git "subtree" is a perfectly normal Git branch.</p> <p>Pros:</p> <ul> <li>No extra tool support needed, except when you need to pull in new changes from the subtree, and even then all support is the <code>-s subtree</code> command line option (see <a href="http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html" rel="nofollow noreferrer">here</a> for the full workflow). You need to remember about subtree only when you do the subtree pull.</li> </ul> <p>Cons:</p> <ul> <li>All subtree commits are visible in the history of the host project.</li> <li>Don't commit changes to the host repository's directory where subtree lives in or face conflicts on next subtree pull.</li> </ul> <p><strong>Submodules</strong> are Git <em>repositories</em> inside the host repository.</p> <p>Pros:</p> <ul> <li>Cleaner history, better separation from the host repository.</li> <li>One may commit directly to the submodule upstream from the submodule repository directly (or so I think).</li> </ul> <p>Cons:</p> <ul> <li>For each (or many) Git command you have remember that you're dealing with repository with submodules, lots of nasty corner cases (or so it was when I looked). Special tool support required to work with each clone of the repository.</li> </ul> <p>Disclaimer: I'm biased against submodules. Try and see for yourself, what approach is better for your workflow.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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