Search code examples
gitfuelphp

I get confused with git repos - FuelPHP project


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. In Symfony I should create a repo under src/ directory but Fuel it's just badly arranged.


Solution

  • I joined to FuelPHP Forum and I've posted the same question. This question was answered by Harro Verton, FuelPHP Project Manager and Developer.

    He wrote:

    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).

    Post link: http://fuelphp.com/forums/discussion/comment/18373#Comment_18373