git - How to commit code when using Composer? -
scenario have added composer.json
file , installed dependancies. in scenario we'll assume i've installed dependancies /plugin
.
now find bug in 1 of packages , prepare , update dependancy.
so create required changes in code.
issue have changed files in dependancy , can't commit them, because .gitignore
ignores /plugin
folder, because beingness managed composer.
question how go beingness able commit code here right repository? avoid using git submodules because converted codebase submodule composer, give me greater flexibility.
ideally create changes, commit , tag code , force it's remote upstream. update composer.json
new tag.
environment - php 5.5.13 - git 2.0.0 - composer 28c65b5425f7f8722c260e3787b74c1ea6b37e3b
there 2 ways integrate library main project: --prefer-dist
or --prefer-source
. first tries download finish bundle if composer knows find it, while sec tries checkout repository (should work because composer knows repository).
if include branch "dev-master", composer checks out repository.
consider have "yourownvendor/library", in "plugin/yourownvendor/library" - , if composer cloned repository, if go library, can straight work in it, i.e. commit files , force (when using git) or commit (when using svn). because ignore whole tree, git not observe repositories in subtree submodules (don't seek utilize them when using composer, ignore path), , using git command treat library repos standalone repo.
very easy indeed. pay attending commit code before using composer command because composer might delete uncommitted changes.
git composer-php
No comments:
Post a Comment