Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Would the following, done on your laptop, solve this issue?<br> Instead of a git clone:</p> <pre><code> mkdir prj1 cd prj1 git init touch README git add . git commit -m "Added blank readme" git remote add origin git@server:prj1.git git push origin master </code></pre> <p><a href="https://stackoverflow.com/users/150032/ebneter">ebneter</a> adds in the comment:</p> <blockquote> <p>You might mention that <strong>the reason this works is that you can't clone an empty repo</strong>.<br> (As my users regularly discover...</p> </blockquote> <p>And that reminds the OP question:</p> <blockquote> <p>... and in <code>/home/git/repositories</code> I have created directory prj1.git with <em>empty git repo</em></p> </blockquote> <p>which is not ideal right there.<br> This <a href="https://stackoverflow.com/questions/895819/whats-the-most-straightforward-way-to-clone-an-empty-bare-git-repository">SO question</a> mentions the issue of cloning an empty repo:</p> <blockquote> <p>In other words, don't attempt to clone the empty repo, but rather after creating it, push to it a simple repo containing one innocuous file. Then it is no longer empty and can be cloned.</p> </blockquote> <hr> <p>Since then, <a href="https://stackoverflow.com/users/193688/chris-johnsen">Chris Johnsen</a> comments:</p> <blockquote> <p>Any Git later than 1.6.2</p> </blockquote> <p>(so actually since March 2009)</p> <blockquote> <p>can “clone” empty repositories.<br> (scare quotes because it really just amounts normal initialization plus setting up a remote, and creating a tracking configuration for the presumed, eventual master branch). </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