I'm currently working on a project where I've incorporated an external repository as a submodule using .gitmodules. Recently, I needed to introduce some custom functionality, so I made changes directly within the submodule and pushed them to my project's repository. However, when my team member pulled from my branch, they didn't receive the changes I made within the submodule.
Upon realizing that I lacked write access to the original submodule repository, I decided to fork it and use the forked repository's URL within .gitmodules. Subsequently, I made further changes within the submodule and attempted to push them to the forked repository. However, my changes were still being directed to the original repository, leading to my team member not receiving the updates.
What is the correct approach to update submodules in such scenarios, ensuring that changes made within the submodule are properly reflected for all team members pulling from the main project repository?