My project is already set and working. Some of the files are from an external project. Now, I want to use git to manage the changes of the external file from upstream.
I did the following:
rm <external files> # <= should use "git rm"
git commit -m "prepare submodule"
git submodule add <...remote...> extLibs
cd extLibs
git pull master
<make changes>
git commit -m"make external project work with my project"
cd .. # back to upper level project
At this point, I found I have to commit changes in my main repo again for the files I have already committed in the submodule. I don't even know if it is the correct behavior. Can I change it so I don't need to commit twice?