How do I upgrade git submodules to the “gitfile” format?

Since version 1.7.8 git stores the repository information for a submodule inside the GIT_DIR of the containing repository. In the submodule .git now is a file with a “textual symlink” to the actual GIT_DIR (usuall something like: gitdir: ../../.git/modules/submodule-path).

It seems that git doesn’t update old submodules to fit this new standard.

  • POST hook on Bitbucket
  • Git push everything to new origin
  • Jenkins build only for develop branch
  • git fast-import --export-marks flag
  • git checkout PREV
  • Git: How to ignore/specify files for *checkout*
  • What is the recommended way of upgrading the format? Do I just:

    1. move the GIT_DIR of my submodule into the GIT_DIR of my containing repository and
    2. write the gitfile by hand

    I’m asking because I’ve broken to many things by improvising. I suppose this has no impact whatsoever on how remotes store the repositories?

  • How to Manually Deploy a Rails App with Git
  • How to merge specific revision of my branch to other branch GitHUB?
  • Git using wrong email address when talking to Heroku
  • How to diff two commits or files on a remote repository with git?
  • GIT: add only some files from remote repository as submodule
  • Gitolite permissions on branches
  • Git Baby is a git and github fan, let's start git clone.