Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I recommend not to use git submodules, but 2 different repositories that are not connected on github.</p> <p>You could build the relationship between them using symlinks on the checked out copies, which is basic and simple. The symlinks only have to be created once per location (production, development, coworkers).</p> <p>The advantage is that nobody has to do the extra effort to learn and maintain git submodules, and you avoid the risk and complexity it brings.</p> <p>It could be done by keeping a working copy of the os and of the private git repo somewhere on your local machine:</p> <pre><code>/repos/myproject-os /repos/myproject-priv </code></pre> <p>Then you could create create your directory structure where the project actually will live and be worked on somewhere else on this machine (not inside the /repos/ tree) and create symblinks for the subdirectories you use:</p> <pre><code>ln -s /repos/myproject-os/dir1 /wrk/myproject/base/dir1 ln -s /repos/myproject-os/dir2 /wrk/myproject/base/dir2 ln -s /repos/myproject-priv/dir1 /wrk/myproject/base/dir3 ln -s /repos/myproject-priv/dir2 /wrk/myproject/base/someother/dir4 mkdir /wrk/myproject/base/config mkdir /wrk/myproject/base/tmp </code></pre> <p>That way you have the repository structure always clean and can mix and arrange the directories from both repositories the way you want them, and you have also a space for local configs or temp files that do not go into the repositories.</p> <p>You would do the git commits and everything from the /repos/ tree and your project would run and you would edit the files from the /wrk/ tree. Please note that the .git diretory where the git data lives would <em>not</em> be available form the /wrk/ tree, because you only link to subdirectories (or possibly single files from the root directory).</p> <p><em>Part2:</em> You say you want to make sure that you do not accidently push private code into the public repository. You could set up an additional git repository between your working OS repository and the github repository, let's say you put it into /repos/gatekeeper, then your tree looks like this:</p> <pre><code>/repos/gatekeeper/myproject-os /repos/myproject-os /repos/myproject-priv </code></pre> <p>Every time you push from /repos/myproject-os it goes to /repos/gatekeeper/myproject-os. But from /repos/myproject-priv you push directly to your private github repo.</p> <p>That way you have the same workflow in both /repos/myproject-os and /repos/myproject-priv and you don't need to worry so much. From time to time when you want to push your changes to the real OS codebase, you go to /repos/gatekeeper/myproject-os and push from there to github.</p> <p>You could do additional code review before that and look at the diffs so you are sure that only that what you really want goes public. </p> <p>If you want additional security the /repos/gatekeeper/myproject-os could also be on a different machine or even different location.</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