Correct (but you do need to commit the change of commit hash to the parent repo).

Yes, just never change the url in the .gitmodules file. Although I usually find that I leave the libavr32 submodule origin permanently pointing at my fork and just sync up the changes from upstream.

The main thing to remember with submodules is that it’s the commit hash that’s stored in the history, git doesn’t really care which fork it’s from (that’s not how git works). The url from .gitmodules is only used for the initial checkout.

1 Like