Git: ’submodule’ is not a git-command



This was the error I received when deploying a Capistrano deployment from github. Keep in mind to even get your submodules deployed you’ll need to add the following var to deploy.rb:

set :git_enable_submodules, 1

It turns out that I had git 1.5.2.5 and submodule support did not come until 1.5.3. So I was forced to upgrade. The process went something like this:

sudo apt-get update

sudo apt-get build-dep git-core

sudo apt-get remove git-core

wget http://www.kernel.org/pub/software/scm/git/git-1.6.2.tar.gz

tar xzf git-1.6.2.tar.gz

cd cd git-1.6.2

./configure

make

sudo make install

Type “git submodule” and you should see the appropriate error, meaning it recognizes the submodule parameter. There’s a chance that git won’t be in your path so just do the following:

export PATH=$PATH:/usr/local/bin

You should be good to go!



3 Responses to “Git: ’submodule’ is not a git-command”

  1. Joe says:

    Hi Dennis,

    worked for me and saved some time

    great !

    thanks

    Joe

  2. dennis says:

    No problem Joe. At least there are two of us that ran into the same problem :)

  3. Mike Daniels says:

    I am on a shared server and I could not find “deploy.rb” anywhere under my jailed shell access in a shared server. I am using Git 1.7.0.2. Please assist.

Leave a Reply