$ cd ~/.dotfiles/
$ git submodule add http://github.com/scrooloose/nerdtree.git vim/bundle/nerdtree
$ git submodule init
$ git commit -m 'Add nerd tree plugin as submodule'
Git submodules are locked to specific commits in their respective repositories...in other words, updating the parent repo will not do the same for that project's submodules.
Running git submodule update
only makes sure that the submodules are at the
specified cached revision, not the upstream latest. To actually update all of
your submodules to the latest upstream HEAD revisions:
$ cd ~/.dotfiles/
$ git submodule foreach git fetch
$ git sumbodule foreach git merge origin/master
$ git commit -a -m 'Update all submodules to latest upstream HEAD revision'
$ git push
$ cd ~/.dotfiles/
$ git pull
$ git submodule update
$ git submodule status
$ git ls-files --stage
To remove a submodule from your repository, you must edit the obvious .git/config and .gitmodules files, but also run this command to finish the job:
$ git rm --cached path/to/submodule