codeigniter - Particular Issue - Git - Incorporating Multiple Repositories -


i planning start new website , use of libraries newly moved git. have made post commit hook bitbucket , have php deploy script in root of web host. intention when make push, deployed server. this question regarding how can organize content & libraries in website.

  • i have customized version of codeigniter
  • i have few libraries need use (from old projects)
  • all of these git repos not following codeigniter folder structure
  • my server doesn't have git
  • the deploy script such download repo , extract it, nothing fancy
  • all sources in [root]/src folder

ideally, this.

  • go src, sort of fetch codeigniter library
  • got libraries folder , kind of fetch each library have
  • when of these come stable release, go respective folder , update

after doing reading am.

  • i might able add remote codeigniter repo. when updated, rebase
  • i use git submodules, not deploy src (i need src there deployment purposes)
  • i can't add remote , fetch libraries don't follow codeigniter folder structure

as understand, best workaround change folder structure of libraries follow codeigniter standards , rebase when necessary.

is there other work around can this?

help highly appreciated.

here's working example based on comments original post. in simple example, i'm interested in tracking python_koans project, locally want koans/ folder python 2 koans python files python_koans/python2/koans/ in it. in other words, want version of files in project not follow original project's file structure @ all, don't want fight structure of python_koans project. symlinks rescue.

mkdir myproj cd myproj git init git commit --allow-empty -m'add empty, initial commit' git submodule add https://github.com/gregmalcolm/python_koans.git git add python_koans git commit -m'add python_koans project submodule' mkdir koans cd koans ln -s ../python_koans/python2/koans/*.py . cd .. git add koans git commit -m'track python_koans locally in koans/ via symlinks' 

now you're tracking python_koans project in python_koans/, , have files care deep inside structure symlinked project how want them. in your git repo you're tracking own symlinks (and current commit python_koans submodule on).

at point can make helpers, shell script cd koans , ln -sf ../python_koans/python2/koans/*.py . refresh symlinks. write bit more purge stale links files deleted upstream, , maybe check overall hierarchy in other ways, or handle manually if trust enough so.

why make submodule? pull latest python_koans repo in home folder, , update things there structure, lose ability go in time easily. making other projects submodules, you're able cd submodule_folder; git pull, out in folder git add submodule_folder; git commit -m'pull latest other_project', , can checkout point in time later , have submodule's project roll right time, too, having symlinks update point in time match up.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -