This my project structure in a nutshell:
+ A
| + some content
|
+ B
+ A
I want in my main git repo a submodule in B
that points to A
. But since the A
project contains the main method, I want to be able to quickly test before committing, so I'd like a symlink (or rather a mklink
since I'm on windows) that points to A
so it gets updated without committing.
The problem is that A doesn't have just "some content".
It also has a
.git
subfolder in it, which a submodule does not.If you can, use
git worktree
in order to checkout a branch in a separate folder (than the originalA
cloned folder)Then you can try and use a symlink from
B
subfolder toA
, after addingA
as a submodule inB
.Note: since Windows 10 build 14972 (Dec. 2016), symlinks (
mklink
) can be created without needing to elevate the console as administrator.A better approach is described in "Git: Possible to use same submodule working copy by multiple projects?".