简体   繁体   中英

How to let Composer import working copy of existing (git) folder?

I've got a couple git projects and currently I'm working in two at the same time. I now want to import one of project into the other using composer. I try to do this using the following lines in my composer.json file:

"repositories": [
    {
        "type": "vcs",
        "url": "../otherproject"
    },
    {
        "type": "composer",
        "url": "http://our.local.stuff.com"
    }
],

This does seem to import the project, but only from the latest commit in that git repo. Instead, I would like it to import the existing files how they are, so that I don't have to commit for every little change I do in that project.

Does anybody know how this would be possible? All tips are welcome!

Composer will clone the remote repository, and you can actually work inside that folder with that Git repository just like when it is located anywhere else.

Saving changes to files will make them effective immediately. Adding and committing them will persist them in the repo locally. Pushing a branch makes the changes available to others.

The only thing you should be aware of is that using any Composer command might destroy any uncommitted changes. So be careful when installing or even updating when you have uncommitted changes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM