Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
I get confused with git repos
  • I have a initial application setup and I have a basic directory structure. Currently I'll use Fuel PHP Framework for my project and here is question come in, (see here the image)

    Should I init repo in root directory (what includes framework souce as well) or in app directory(only specific application source code)? What the best approach? I just got confused with.

    I think that I should track only specific application code but I'm not sure.

  • HarroHarro
    Accepted Answer
    The answer is (unfortunately); it depends.

    First question is, did you install from zip, or by cloning the fuel/fuel repository (manual or through oil install)?

    If by zip, then you don't have a local repo, so you can just init a new one in your installation root, and you'll have everything in one single repository.

    You would do this, for example if you deploy your application as a whole (for example using FTP), you don't have commandline access on your production server, or your server doesn't have direct internet access.

    If you want this but cloned the repo, you need to remove the .git directories in fuel/core, and all fuel/packages, so that it becomes a single repo. You will still have your installation root .git folder (which is the fuel/fuel repo), so you need to change origin from https://github.com/fuel/fuel to your own repository.

    If you do have commandline access and internet access, I would not use the zip, but clone the fuel/fuel repo, and use composer to install the rest of the framework. Don't remove the .git folders, only change the origin to point to your repository.

    If you now push, you only push the fuel/fuel repo to your repository (containing the app and any modules), but not the framework itself (the core repo and all packages).
  • Thanks Verton! 

    I see...
    I have cloned the repo.
    So I've removed .git directory and I did init the new repo. Thus, I used composer in order to install components,

    Thanks so much!

Howdy, Stranger!

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

In this Discussion