Hi! Thanks for visiting my blog. If you've received any value from my content would you mind supporting my new startup by downloading our browser add-on? It's called PriceBlink and makes online shopping a breeze. You can watch it in action here and download it for Chrome, Firefox, IE, or Safari by going to PriceBlink.com. Thank you and I hope you enjoy!

Git: ‘submodule’ is not a git-command

Apr 17

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 comments

  1. Hi Dennis,

    worked for me and saved some time

    great !

    thanks

    Joe

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

  3. Mike Daniels /

    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