понедельник, 10 сентября 2012 г.

Git remove submodule

Params:
git version 1.7.9.5

Problem:
Bundles DoctrineFixturesBundle and DoctrineMigrationsBundle has changed repository URLs and namespaces. So I can't update submodules.

Solution:
1) Remove appropriate sections in .git/config file:
pattern: git config -f .git/config --remove-section submodule.$submodulepath
> git config -f .git/config --remove-section submodule.vendor/bundles/Symfony/Bundle/DoctrineFixturesBundle
> git config -f .git/config --remove-section submodule.vendor/bundles/Symfony/Bundle/DoctrineMigrationsBundle
It also remove appropriate sections in .gitmodules file, if not, use this command:
pattern: git config -f .gitmodules --remove-section submodule.$submodulepath
2) pattern: git rm --cached $submodulepath
> git rm --cached vendor/bundles/Symfony/Bundle/DoctrineFixturesBundle
> git rm --cached vendor/bundles/Symfony/Bundle/DoctrineMigrationsBundle

3) Commit this changes:
> git commit -m "Remove submodules DoctrineFixturesBundle and DoctrineMigrationsBundle"

Комментариев нет:

Отправить комментарий