CakePHP3: Creating a github repository from existing development setup

Dear All

I need to start using version control for my project now as the changes are getting more and more complex.

I have an account on but I am definitely a “newbie”.

So I need some guidance on the best way to upload all of the files from my development setup (cake & dependency updates via composer) and put up to a github Repository. Should I fork cake first?

I hope this will also be the best way of taking my code to my production server too which is almost near setup completion using Digital Ocean.



Read this article about how to add your existing files to github:

As we are speaking about CakePHP I would recommend to add /vendor, /tmp, /logs, /plugins to your .gitignore file.

You do not have to fork cake.

And than here is how to deploy: Deployment strategy

1 Like

I would also recommend ignoring composer.lock and config/app.php. This file should only contain configuration settings that you may not want to keep versioned. You could create a new version of it using composer install end entering data.

You should always commit your composer.lock file and only run composer install. That is the file that keeps track of the exact dependency versions that you have tested and developed with.

1 Like