I may have the wrong approach here, but this is what I want to do and I'm not sure how to do it:
I have a source tree (a magento shop) which is one big git repo. magento is expandable with extensions, and I did install one. an extension is basically another source tree, which is copied into the main source tree and so gets added to the main repo.
now I want to add a new version of the extension. I could just copy over the new source tree, which would overwrite my own changes. what I would like to do instead is merging the updated source tree into the main repo.
my impression is, that I could add the extension source tree as a git-submodule. how would I do this and what happens with the existing files, which are tracked in the main repo now, but should be tracked in the git-submodule (as I understand it).