Search code examples
gitcakephpgithubgitignore

Using Github, CakePHP 3 and Composer


I am trying to find the best way to work with CakePHP 3 on GitHub with multiple workstations.

Scenario: I have installed CakePHP 3 with Composer into a fresh directory and created a git repository from it with the github cli. Using the default .gitignore delivered with cakephp. After pushing the repo to the remote server I started to work on that project.

Later at home I wanted to continue the work and ran into the following problem: Both, Composer and GitHub (CLI and GUI) need a empty folder to install the cakephp core or clone the repo. So, what would be the best way to deal with that problem without deleting the .gitignore and push the whole cakephp core to the repo?


Solution

  • If composer globally installed in your home computer, after clone just use below command in your project folder.

    composer update
    

    This command need only 1st time. Then cakephp core will download automatically.Then it will work fine.I think it's an easy solution.

    Complex solution is,you can change git ignore file, then create repo, after clone in your home computer change again git ignore file.