symlink - Symbolic Link git Submodule To Reference Files -
so here i'm trying do. have unity 3d project reusable code. , want add other projects house in git.
so let's have project 'foo'.
want clone foo , add reusable scripts sub-module;
want symbolic link folder contains reusable scripts in sub-module , 1 exists in project foo's asset folder.
when make change in project, push changes sub-module project.
this confusing, please let me know if need more specific , try better.
it best separate 2 environments:
the git clone one, have foo , foo/script submodule:
git clone foo /url/of/foo git submodule add /url/of/script git add . git commit -m "add script submodule of foo" git push
the working environment, set symlinks foo , script scripts.
cd somewhere/else ln -s /path/to/foo/file1 ln -s /path/to/foo/scripts/scrip1 ...
that way, once have modified scripts, can go in foo, , git push --recurses-submodules=check
, in order make sure have added/push both foo/scripts , foo.
Comments
Post a Comment