1

我有一个 php 项目,我在其中使用 neo4Jphp 作为依赖项:

"everyman/neo4jphp": "dev-master"

它根据需要加载库,但是当我这样做时:

commit add -A

它添加了 vendor/neo4jphp 但没有低于该级别。

结果是neo4jphp lib没有提交,我无法将它推送到我的远程存储库。

我认为这可能与此有关,.gitignore但我认为不是:

# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm

*.iml

    ## Directory-based project format:
    .idea/
    # if you remove the above rule, at least ignore the following:

    # User-specific stuff:
    # .idea/workspace.xml
    # .idea/tasks.xml
    # .idea/dictionaries

    # Sensitive or high-churn files:
    # .idea/dataSources.ids
    # .idea/dataSources.xml
    # .idea/sqlDataSources.xml
    # .idea/dynamic.xml
    # .idea/uiDesigner.xml

    # Gradle:
    # .idea/gradle.xml
    # .idea/libraries

    # Mongo Explorer plugin:
    # .idea/mongoSettings.xml

    ## File-based project format:
    *.ipr
    *.iws

    ## Plugin-specific files:

    # IntelliJ
    out/

    # mpeltonen/sbt-idea plugin
    .idea_modules/

    # JIRA plugin
    atlassian-ide-plugin.xml

    # Crashlytics plugin (for Android Studio and IntelliJ)
    com_crashlytics_export_strings.xml
    crashlytics.properties
    crashlytics-build.properties

知道是什么原因造成的吗?

4

1 回答 1

0

好的,问题是 Neo4Jphp 被添加为子模块,因此,它没有提交并推送到我的存储库。

我不得不从我的 git 模块列表中删除它,添加所有并提交:

git rm -f --cached path_to_submodule
git add -A
git commit -m "commit message"

我在 remove 中使用了 -f ,否则它对我不起作用(可能是因为它是另一个 git 存储库的子模块,它在我的 git 中弄得一团糟)。

于 2015-06-02T11:47:07.033 回答