Advanced Template App with Github and Composer

I created an advanced template app on one computer, checked it into Github. Then cloned the repository to a new computer (computer B). But many files don’t exist in the github repository. With Yii2, I’m using Composer as a newbie.

What are the right steps to create a fully working version of the cloned repository?

Do I run init on the new computer B?

How do tell Composer to update the vendor folder et al?

Anything else that needs to be done?


  • composer update

  • init

Thanks - I finally figured that out. But on my Mac dev box, I needed to run sudo with php init or it didn’t create the index.php files - it also didn’t give error msgs.

Any idea on how to configure composer and the init file to not require sudo?

It could be permissions issue. Check that user you’re executing composer from has all necessary permissions.