Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>May be just have a git repo with the minimum number of file in it:</p> <p>one: <code>.gitignore</code> with obvious ignore patterns in it.</p> <p>And then clone that "almost empty" repository.<br> Note that such an "almost empty" repository ("almost" because it still has a minimal working directory alongside the .git directory) can then by '<code>git clone --bare</code>' (as <a href="https://stackoverflow.com/questions/738154/what-does-git-updating-currently-checked-out-branch-warning-mean">illustrated here</a>), making it a true bare repo (but not an "empty" one).<br> This is that bare repo you can then:</p> <ul> <li>clone everywhere you want.</li> <li>or (more importantly) push to (since it is a bare repo)</li> </ul> <hr> <p>You have in <a href="http://kerneltrap.org/mailarchive/git/2007/7/13/251504/thread" rel="nofollow noreferrer">this thread</a> a good summary of the "other way around" (which I keep here for reference).</p> <pre><code>$ git-init $ git-remote add origin server:/pub/git/test.git </code></pre> <blockquote> <p>For a new project (no code yet) I wanted to make an empty, bare<br> repository (no working copy) on a remote public server as a starting<br> point, clone it locally, and gradually create content locally and<br> push it out to the remote, public server.</p> </blockquote> <p>To which Junio C Hamano responded:</p> <blockquote> <p>You prepared an empty bare repository for publishing, and that is very good.</p> <p>The next step is that you prepare your contents elsewhere. That would be your private working place, i.e. the place you would normally work in).<br> You push from your private working place into that publishing repository.<br> Your working place is where the very initial commit should come from, since you are the one who is starting the project.</p> <p><strong>Note that the private working place does not have to be a clone of the empty one. That actually is backwards. Your work started from your private working place to the publishing one.</strong></p> <p>You could even clone your private repository to publishing one to make it clear who is the master and who is the copy if you wanted to, but because you already have the bare repository for publishing, just pushing into it is all that is needed.</p> </blockquote>
    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