git submodule deinit <path_to_submodule>
git rm <path_to_submodule>
git commit-m "Removed submodule "
rm -rf .git/modules/<path_to_submodule>
git checkout mybranch
git merge --strategy=ours --no-commit master
git checkout master
git merge mybranch
git submodule deinit <path_to_submodule>
git rm <path_to_submodule>
git commit-m "Removed submodule "
rm -rf .git/modules/<path_to_submodule>
git checkout mybranch
git merge --strategy=ours --no-commit master
git checkout master
git merge mybranch