Closed sabinem closed 3 months ago
Hello @sabinem, no problem on this one. However, what's the difference? I usually do --recurse-submodules
, can this lead to an issue?
@caviri Yes exactly: if you do:
git clone --recurse-submodules git@github.com:odtp-org/odtp-travel-data-dashboard.git
Then you are checkjng out the submodule from the main branch at its current state. Now when you then do then checkout a commit then you might get the code from the checked out commit, but the submodule code is not updated with it. So if the new commit had a different version of the submodule you would not get that version. For that you would need to synchronise the submodule. Not sure which git command exactly that is.
The way I do it her is just the easiest: I first checkout the commit and then get the submodule at the state that this commit uses.
Was my explanation clear enough?
Yes, @sabinem I see the potential issue now. Seems like a nice workaround to me. Thanks for the explanation
clone the component repo in such a way that the submodule is taken from the component repo commit: this needs to first check out the component commit and the fetch the submodule