Source Control

Hi all,

I have a Yii web app which I need to check into source control (GitHub), to allow a graphics designer to do some work for me. The intention is for him to be able to work locally so I essentially need to upload all of the code. I was just wondering what is common practice for managing Yii projects in source control? If I simply checked in everything under my ‘protected’ folder would that do? I understand there would still be set up required for new developers in terms of installing the Yii framwork, XAMP etc. but this seems like the easiest solution.

I am also thinking long term here with the intention of bringing more developers on in the future, so I’d like to get it right the first time around.

Thanks!

I would personally put it on bitbucket and only share with the developers. as far as directories are concerned add everything except the framework folder

If you use git/github:

Include all app files from webroot, except assets, runtime, maybe .htaccess und userspecific folders from the php-editor (.idea for phpstorm).

Exclude .htaccess the developer have different RewriteBase configured (documentroot alias in apache).

A .gitignore example:


/protected/runtime

/assets

/.idea

/.htaccess

Thanks guys. I’ve just got a question about my extensions directory. I have downloaded a few Yii extensions (all of them open source) from Github and unzipped them. I would like to check these in too but am not sure if this will cause problems as a few of the contain their own .git* files as well. Will this be a problem? Sorry if this is a stupid question, I am new to git.

If possible, add those extensions as submodules. This was it will be easier to update them and conserve some of your precious quote on GitHub.