Git submodules not updating?

I have a project in which I’ve included some libraries as submodules. They work fine on the machine that you add them on, but when I get home and checkout the repo, I get the folders for the submodules but they are empty.

.gitmodules

  • Merging git branches when one has a revert that the other doesn't want
  • Git commit a commit message and nothing else?
  • git backout master, push to branch, to go into master at later date
  • How to commit a git repository inside another git repository
  • IntelliJ git fetch pruned remote references
  • How to keep a git branch in sync with master
  • Neon@Neon-PC /cygdrive/c/xampp/htdocs/learning-lithium
    $ cat .gitmodules
    [submodule "libraries/lithium"]
            path = libraries/lithium
            url = git://github.com/UnionOfRAD/lithium.git
    [submodule "app/webroot/css/elements"]
            path = app/webroot/css/elements
            url = https://github.com/dmitryf/elements.git
    [submodule "app/libraries/li3_markdown"]
            path = app/libraries/li3_markdown
            url = https://github.com/sandelius/li3_markdown.git
    [submodule "app/webroot/markitup"]
            path = app/webroot/markitup
            url = https://github.com/markitup/1.x.git
    

    Config and status commands

    Neon@Neon-PC /cygdrive/c/xampp/htdocs/learning-lithium
    $ git submodule
    -af14f48b419310935446176290e1f9dc641400e0 app/libraries/li3_markdown
    -ebdcd8ca09c874f5e2ef81ec198cc441f37a4f74 app/webroot/css/elements
    -328291e49a3c7e1fb76b3342f112734864836205 app/webroot/markitup
    -4980010526d05c556c496ff63951da31828c5943 libraries/lithium
    
    Neon@Neon-PC /cygdrive/c/xampp/htdocs/learning-lithium
    $ git submodule update
    
    Neon@Neon-PC /cygdrive/c/xampp/htdocs/learning-lithium
    $ git submodule status
    -af14f48b419310935446176290e1f9dc641400e0 app/libraries/li3_markdown
    -ebdcd8ca09c874f5e2ef81ec198cc441f37a4f74 app/webroot/css/elements
    -328291e49a3c7e1fb76b3342f112734864836205 app/webroot/markitup
    -4980010526d05c556c496ff63951da31828c5943 libraries/lithium
    

    I added these as you would normally with,
    git submodule add <repo> <path>
    git submodule init

    The submodules are hosted on Github and my repo is hosted on Bitbucket, although I’m not sure if this is relevant.

  • SQLite table with Git merging
  • Connecting to github by https using user:pw@github.com/repo when pw ends with @
  • Mixing tabs and spaces without mixing tabs and spaces
  • Git: localhost > remote development > remote production
  • Setup remote tracking in Jenkins / Git
  • How to remove git commit with missing directory
  • One Solution collect form web for “Git submodules not updating?”

    Try cloning with the –recursive option.

    Git Baby is a git and github fan, let's start git clone.