Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You're probably looking for <a href="http://git-scm.com/docs/git-submodule">submodules</a>:</p> <blockquote> <p>Submodules allow foreign repositories to be embedded within a dedicated subdirectory of the source tree, always pointed at a particular commit.</p> </blockquote> <p>A key word there is <em>embedded</em>: an actual clone of Common.git would be embedded inside each of the other projects. This is generally good for when you're not going to modify it inside the other projects, just use one version, and update that version from the original Common.git now and then. You'd do something like this:</p> <pre><code># add Common.git as a submodule at the path "common" inside this repo git submodule add /var/Common.git common # initialize it, clone, and check out a copy git submodule update --init # commit the addition of the submodule git commit </code></pre> <p>Note that the path to the submodule is going to be committed to your repository, so you should use a publicly available URL. If you want to customize it locally, you can run <code>git submodule init</code>, edit the url in .git/config, and then run <code>git submodule update</code>. If you have further questions, consult the manpage or search SO; there are plenty of submodule questions here.</p> <p>If on the other hand you're going to be editing the contents of Common.git inside each of the projects, you may want to use <a href="https://github.com/apenwarr/git-subtree">git-subtree</a>, which is a friendly wrapper around git's subtree merge faculties. That will let you regard the contents of common.git as tracked content inside each of the projects, while still being able to split out commits to it and merge them into Common.git itself, and merge updates to Common.git back into the projects.</p>
    singulars
    1. This table or related slice is empty.
    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.
    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