I've finally incorporated GitHub and Composer dependency management on my workflow. It's definitely a huge step forward, although I remain very confused about GIT managing the "nested" dependecies.
As I'm using an awesome Wordpress Stack ROOTS/BEDROCK, my simplified directory structure looks like this:
|-- /project
| |-- /.git // git repository for the skeleton/stack of the project
| |-- composer.json // list of dependencies, most of them are my own repositories on GitHub
| |-- /vendor
| | |-- /php-dependency-1 // 3rd party dependencies not directly related to Wordpress
| |-- /web
| | |-- /app // acts as "wp-admin" folder
| | | |-- /mu-plugins
| | | | |-- /SUBREPOSITORY-1 // my own framework feature, public, GitHub
| | | | |-- /SUBREPOSITORY-2 // my own framework feature, public, GitHub
| | | |-- /plugins
| | | | |-- /SUBREPOSITORY-3 // my own plugin, public, GitHub
| | | |-- /themes
| | | | |-- /SUBREPOSITORY-5-PARENT-THEME // parent theme used on my framework, public, GitHub
| | | | |-- /SUBREPOSITORY-6-CHILD-THEME // work for client, private, BitBucket
| | |-- /wordpress // Wordpress CMS
| | | |-- /wp-admin
| | | |-- /wp-includes
"Subrepositories" are defined in my composer.json
on the root of the project and are downloaded from GitHub by composer install
. So far so good.
But! I expect to tweak my parent-theme
and some mu-plugins
a lot, I need to be able to push/commit from each of my projects they will be included. As you know, you can't really test wordpress theme without a wordpress installation ...
So ... which way to go? There IS A LOT of posts about this topic and most of them mention SubModules, but if I get the idea of Composer correctly, they are kind of in conflict with each other.
Just use nested .git repositories seem great for my case, altough it does not seem to work - if I try to push/commit nested repo, either "everything is up to date" or I get messages such as Your branch is ahead by 1 commit.
So just "nesting it" is a no a go?
Thanks in advance and sorry for a little confused tone of the question, I drowned a little in the topic. :) Any help would be much appreciated.