Reputation: 10895
After some trial and error I noticed that links created with mklink /D Foo ..\..\Bar\Baz\Foo
(pointing to a another file in the same repo) can be commited and cloned without issues even on macOS. Unfortunately when this particular link points to a submodule, then Windows behaves odd when cloning. The reason is most likely, that the links stored in the repo are pulled before cloning the submodules. Since the links point nowhere at this particular time they are broken and will stay broken even after the submodule has been cloned.
One workaround is to del
the particular link and git checkout -- *
to restore it in a working state. However I'd like to refrain from doing this manually and I'd like to know whether there is any other way. Something like forcing the submodules to be pulled before the repo itself maybe?
Upvotes: 3
Views: 533
Reputation: 1326872
However I'd like to refrain from doing this manually
You could implement some kind of post-clone hook, like the one presented in the GitHub project.
Upvotes: 2