Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Core and Vendor packages not comited?
  • Disclaimer: I'm not a git expert, so this might not be a FuelPHP problem but merely a "Git ignorance" issue. :D

    I have noticed something weird: I'm trying to commit and eventually checkout/push my files to a Git repository. I noticed that the core as well as the vendor directories are not included in the checkout. I thought I was only having some Git issues because I pulled the files from the Fuel repo. But I tried direct download, installed it on my machine fresh, created the Git repo and checked out and yes, still those directories are not included.

    My team is distributed. So, my workaround is to have them download the core files, install it on their system and run composer to update the vendor directories. However, that won't work if I'm hosting with Git based PaaS like Heroku or Pagodabox.

    Am I missing something? Is this normal? Or is there something that I need to do to be able to have git commit my core and vendor directories/files?

    Thanks!
  • HarroHarro
    Accepted Answer
    Fuel/Core and all packages are installed as submodules from a separate repo, Vendor is installed through composer, but (usually) as repositories too.

    git recognizes that these are repositories, and will not add them to a "parent" repository.

    If you want to include everything in your application repository (we do to, our production servers don't have internet access so they can't download anything), there is a simple trick.

    Go into the directory (for example fuel/core), rename the .git folder to "somethingelse". After this, all core files will show up as new in your application repository. Add them and commit them (be sure to exclude the "somethingelse" directory from the commit). After this, you can rename the folder back to ".git". Do this for all other repositories too.

    After this you have a main application repository that contains everything, and you still have all your repositories local so you can update them individually using a new pull. All other people in the team, that work from a checked-out application repository, only have all files.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion