title: Git with a "two-stage remote"
body: <p>I have a project hosted on GitHub and I would like to work locally on it. I have multiple Computers that need to access it and I would like to share code between them. However, I do not want all of these commits to go on GitHub, so a simple "clone and then just push/pull" approach does not suit.</p>
  
  <p>Essentially, I want this:</p>
  
  <pre><code>[GitHub] --&gt; [A Local Network Share] --&gt; [PC1]
                                       --&gt; [PC2]
  </code></pre>
  
  <p>So PC1 and PC2 should be able to push/pull to the local network share and thus share code between each other, and every once in a while I want to push those changes to my GitHub repository.</p>
  
  <p>I'm a bit lost here - do I just create a branch? Or do I git clone from GitHub to my share and then git clone from my share to PC1 and PC2, which would result them only having 1 remote (the share) and the share only having 1 remote (GitHub)?</p>
  
  <p><em>Edit:</em> It's not for security - I don't mind when all the immediate commits go to GitHub, and I also don't want to prevent PC2 from accessing GitHub. It's more that I don't want to setup the whole SSL stuff and because I am someone who commits very very often (sometimes every few minutes - I use git commit as an extended undo function), and I want the code on GitHub always to be compilable.</p>
  
  <p><strong>Edit 2:</strong> The solutions here did not work for me yet :( So I do</p>
  
  <pre><code>git clone --bare git@github.com:foo/bar
  </code></pre>
  
  <p>on my server. This creates a clone. On my PCs, I git clone this repository - that step works fine, my PCs have a .git repository and my server is set up as a remote.</p>
  
  <p>However, on the server, nothing is set up properly - there are no remotes added and i can't push from there. Adding a remote is easy using git add, but then how do I push? git status says it requires a work dir (which we don't have with --bare), and git push says "Everything up to date" even though it isn't (I made a change on PC1 and git pushed to the Server)</p>
  
  <p>Creating the repository on the server without --bare means that it has it's own work dir, so when I git push from the PCs, the server does not pick that up (I'm guessing I somehow need git pull from the PCs, but I want to avoid that).</p>
  
  <p>Am I missing a step here?</p>