Git - Neo4JPHP doesn't add to commit

39 Views Asked by At

I have a php project in which I use neo4Jphp as a dependancy:

"everyman/neo4jphp": "dev-master"

It loads the lib as needed, but when when i'm doing:

commit add -A

It adds vendor/neo4jphp but nothing below that level.

It ends up that the neo4jphp lib is not commited and I can't push it to my remote reposatory.

I thought it might have something to do with .gitignore but I think not:

# 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

Any idea what can cause that ?

1

There are 1 best solutions below

6
On

Ok so the issue was that Neo4Jphp is being added as a submodule, hence, it didn't committed and pushed to my repository.

I had to remove it from my git modules list, add all and commit:

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

I used -f in the remove or else it didn't worked for me (probably because it was a submodule of another git repository and it made a mess in my git).