Git-Repository inside Git-Repository (no submodule) -
i want utilize gitrepository within gitrepository. know there submodules read aren't great. right created git repository, added .gitignore , accepted files via whitelist. created directory within , created git init new git repository within root repository. right works without problems...
i seek visualize situation:
root-repository - .git - script.bat - readme.md - .gitignore (which ignores * , whitelists !script.bat !readme.md !.gitignore) - directory - - .git - - .gitignore - - other files...
what want achieve? root-repository should first repository every developer pulls. runs script (which git clones projects, adds environment variables, build dependencies , on..).
is okay or there downsides?
i haven't worked git submodules yet, can't compare 2 solutions. have done similar thing, similar reasons, difference root project not git repository. situation this:
root_directory - git_repo_1 - git_repo_2 - ... (more repos) - project_build_repository.
the project build repository contains scripts cloning entire project , building (the entire project built various subprojects, each of can built or used independantly).
there few downsides doing this, , there additional downside approach have taken not nowadays in variant have done.
the general downside whenever have apply operation all/multiple repositories, have manage manually, or manage script. leads variety of derivative problems -- forget something, have maintain scripts, deviate idiomatic way of doing things git -- depending on how work around root problem.
the disadvantage approach has on mine 1 of ambiguity. naive user might git command (status, force etc) , expect submodules be handled correctly not be. compound issues discussed in previous paragraph.
i don't recommend approach (i evaluating utilize of git submodule , comparing tradeoffs in near future), in approach user following:
create project dir. in project dir, clone project_build_repo. run initial clone script, checks out submodules in right paths.in case readme etc info goes in project_build_repo.
good luck.
git
No comments:
Post a Comment