So, in my repository, which can be found from https://github.com/jyrkiput/vagrant-jenkins-gerrit, I had following .gitmodules:
[submodule "puppet/modules/jenkins"]And with Git 188.8.131.52 installed from with Homebrew (http://brew.sh/).
path = puppet/modules/jenkins
url = https://github.com/rtyler/puppet-jenkins.git
path = puppet/modules/java
url = https://github.com/puppetlabs/puppetlabs-java.git
path = puppet/modules/stdlib
url = https://github.com/puppetlabs/puppetlabs-stdlib.git
path = puppet/modules/firewall
url = https://github.com/puppetlabs/puppetlabs-firewall.git
path = puppet/modules/apt
url = https://github.com/puppetlabs/puppetlabs-apt.git
Unregister all submodules with git submodule deinit
git submodule deinit .This removes submodule configurations, so each module must be removed. So for each module
git rm puppet/modules/[modulename]ie.
git rm puppet/modules/jenkinsCommit your changes
git commit -m "Removed submodules"Add modules as subtrees, so for each module
git-subtree add --prefix=path/to/subtree --squash repository masterie.
git-subtree add --prefix=puppet/modules/jenkins --squash https://github.com/jenkinsci/puppet-jenkins mastergit-subtree will make a commit when a subtree is added, so these are now in your repository
Finally remove .gitmodules for cleaning up things.
The man page of git subtree was really helpful when finding out what to do, and it contains a lot more information.