Note that there are some explanatory texts on larger screens.

plurals
  1. POIs it possible in git to push submodule defined as relative path to bare?
    primarykey
    data
    text
    <p>I got this scenario:</p> <ol> <li><p>I created a Git repository.</p> <p>$ git init</p></li> <li><p>Cloned an external repository in a sub directory. (using git-hg in my case)</p> <p>$ git hg clone lib remote_uri</p></li> <li><p>Added the the cloned library as submodule</p> <p>$ git submodule add lib ./lib</p></li> <li><p>Then I commited the changes</p> <p>$ git commit -am "added lib"</p></li> </ol> <p>After this procedure, if I <code>git clone</code> this repo and <code>git submodule init/update</code> the new one, I get the repo and the lib.</p> <p>Anyway, If I try to push the repo to a bare one, and clone from the bare to another place, the new one crashes trying to get the lib. I tried to <code>git submodule init</code> in the bare, but the command doesn't work if you doesn't have a working copy.</p> <p>Someone got any idea what can be done?</p> <p>** Update ** Here is an example without the hg.</p> <pre><code>This is a way to reproduce it. /tmp$ git clone https://github.com/gitster/git.git /tmp$ cd git/ /tmp/git [master]$ git clone https://github.com/gitster/git.git gitrepo /tmp/git [master]$ git submodule add ./gitrepo /tmp/git [master]$ git commit -am "added repo" /tmp$ cd .. /tmp$ git clone --bare git gitbare /tmp$ git clone gitbare gittest /tmp$ cd gittest/ /tmp/gittest [master]$ git submodule init Submodule 'gitrepo' (/tmp/gitbare/gitrepo) registered for path 'gitrepo' /tmp/gittest [master]$ git submodule update fatal: repository '/tmp/gitbare/gitrepo' does not exist Clone of '/tmp/gitbare/gitrepo' into submodule path 'gitrepo' failed </code></pre>
    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.
 

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