我终于在我的工作流程中加入了GitHub和Composer依赖管理.这绝对是一个巨大的进步,虽然我仍然对GIT管理"嵌套"家属感到困惑.
当我使用一个很棒的Wordpress Stack ROOTS/BEDROCK时,我的简化目录结构如下所示:
|-- /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
"子库"在我composer.json
的项目根目录中定义,并从GitHub下载composer install
.到现在为止还挺好.
但!我希望能够调整我的parent-theme
一些mu-plugins
,我需要能够从我的每个项目中推送/提交它们.如你所知,没有wordpress安装,你无法真正测试wordpress主题......
那么......走哪条路?有很多关于这个主题的帖子,其中大多数都提到了SubModules,但是如果我正确地理解了Composer,它们就会彼此冲突.
只是使用嵌套的.git存储库看起来很适合我的情况,尽管它似乎不起作用 - 如果我尝试推送/提交嵌套的repo,或者"一切都是最新的"或者我得到的消息Your branch is ahead by 1 commit.
如此只是"嵌套它"是不是一个人?
提前谢谢,对于这个问题的一点点混乱的语气感到抱歉,我在主题中淹了一点.:) 任何帮助将非常感激.