search

Home  >  Q&A  >  body text

git - 如何提交带有Submodule的项目?

我的项目中引用了我自己写的一个插件,在github的windows客户端提交时提示:

请问我该怎么做才能提交呢?

phpcn_u1582phpcn_u15822755 days ago638

reply all(1)I'll reply

  • 巴扎黑

    巴扎黑2017-05-02 09:42:41

    Method 1
    Delete your VistorUserCenter directory
    Enter the project root directory
    Run git submodule add the git address of your vistor plug-in src/zb_users/plugin/VistorUserCenter
    Method 2
    Delete the .git directory under VistorUserCenter

    The reason for this situation is that the submodule was not added correctly.
    Is there a .gitmodules file in the project root directory? The general content inside should be like this:

    [submodule "src/zb_users/plugin/VistorUserCenter"]
        path = src/zb_users/plugin/VistorUserCenter
        url = https://github.com/xxx/VistorUserCenter

    There should be no .git directory in the src/zb_users/plugin/VistorUserCenter directory

    reply
    0
  • Cancelreply