Git submodules and ssh access

前端 未结 5 997
遇见更好的自我
遇见更好的自我 2020-12-02 15:30

I have some trouble with a git repository that contains several submodules.

The super git repository was constructed with the commands

mkdir projectn         


        
5条回答
  •  北海茫月
    2020-12-02 16:02

    Just for reference, the solution I ended up using is the following. It is actually possible for others to check out the existing repository.

    When I need to check out the repository it can be done with the commands

    git clone ssh://myusername@server.dk/path/to/superrepos
    cd superrepos
    git submodule init
    git submodule update
    

    For others to check out the super repository, the following set of commands is used. The only difference is the manual cloning of the other repository

    git clone ssh://otheruser@server.dk/path/to/superrepos
    cd superrepos
    git clone ssh://otheruser@server.dk/path/to/other/repos
    git submodule init
    git submodule update
    

    Note that after issuing the

    git submodule init
    

    command, git will tell you that the requested repository and the available is not identical. But this is not fatal and you can safely continue.

提交回复
热议问题