app/
├─ code/
│ ├─ Foo/
│ │ ├─ Bar/
│ │ │ ├─ .git/
│ │ │ ├─ .gitignore
│ │ │ ├─ registration.php
│ │ │ ├─ etc/
│ │ │ │ ├─ modules.xml
│ │ │ ├─ view/
│ │ │ │ ├─ frontend/
│ │ │ │ │ ├─ templates/
│ │ │ │ │ │ ├─ foo.phtml
app/
├─ code/
│ ├─ Foo/
│ │ ├─ Bar/
│ │ │ ├─ .git/
│ │ │ ├─ .gitignore
│ │ │ ├─ registration.php
│ │ │ ├─ etc/
│ │ │ │ └─ modules.xml
│ │ │ ├─ view/
│ │ │ │ ├─ frontend/
│ │ │ │ │ ├─ templates/
│ │ │ │ │ │ ├─ foo.phtml
app/
├─ code/
│ ├─ Foo/
│ │ ├─ Bar/
│ │ │ ├─ .git/
│ │ │ ├─ .gitignore
│ │ │ ├─ registration.php
│ │ │ ├─ etc/
│ │ │ │ ├─ modules.xml
│ │ │ ├─ view/
│ │ │ │ ├─ frontend/
│ │ │ │ │ ├─ templates/
│ │ │ │ │ │ ├─ foo.phtml
│ │ │ ├─ app/
│ │ │ │ ├─ code/
│ │ │ │ │ ├─ Foo/
│ │ │ │ │ │ ├─ Bar/
app/
├─ code/
│ ├─ Foo/
│ │ ├─ Bar/
│ │ │ ├─ .git/
│ │ │ ├─ .gitignore
│ │ │ ├─ registration.php
│ │ │ ├─ etc/
│ │ │ │ └─ modules.xml
│ │ │ ├─ view/
│ │ │ │ ├─ frontend/
│ │ │ │ │ ├─ templates/
│ │ │ │ │ │ ├─ foo.phtml
│ │ │ ├─ app/
│ │ │ │ ├─ code/
│ │ │ │ │ ├─ Foo/
│ │ │ │ │ │ ├─ Bar/
git checkout <target_branch>
git pull
git mv .gitignore registration.php etc/ view/ app/code/Foo/Bar
git commit -am "Moved files"
git push
git checkout <target_branch>
git pull
git mv .gitignore registration.php etc/ view/ app/code/Foo/Bar
git commit -am "Moved files"
git push
app/
├─ code/
│ ├─ Foo/
│ │ ├─ Bar/
│ │ │ ├─ .git/
│ │ │ ├─ app/
│ │ │ │ ├─ code/
│ │ │ │ │ ├─ Foo/
│ │ │ │ │ │ ├─ Bar/
│ │ │ │ |│ │ │ ├─ .gitignore
│ │ │ │ |│ │ │ ├─ registration.php
│ │ │ │ |│ │ │ ├─ etc/
│ │ │ │ |│ │ │ |│ ├─└─ modules.xml
│ │ │ │ |│ │ │ ├─ view/
│ │ │ │ |│ │ │ |│ ├─ frontend/
│ │ │ │ |│ │ │ │ |│ ├─ templates/
│ │ │ │ |│ │ │ |│ │ │ ├─ foo.phtml
rm -rf <my_repo_root>/app/code/Foo/Bar
rm -rf <my_repo_root>/app/code/Foo/Bar
cd myRepoRoot
git remote add sub <url_to_submodule>
git fetch sub
git merge sub/master
cd myRepoRoot
git remote add sub <url_to_submodule>
git fetch sub
git merge sub/master