I've found useful to have a step by step reference guide to work with Git with most used commands, feel free to update it with useful information you may find interesting too.
If you don't have Yii yet
$git clone https://github.com/yiisoft/yii.git
start you project (being at root folder)
$yii/framework/yiic webapp myproject $cd myproject
initialize git
$git init
add empty directories to Git
for i in $(find . -type d -regex ``./[^.].*'' -empty); do touch $i"/.gitignore"; done;
(source https://gist.github.com/18780 )
Adding other submodules that are also on Git repositories and be able to update them easily in the future
git submodule add https://git.gitorious.org/lightopenid/lightopenid.git protected/extensions/
then you can update your repository and external ones with:
git pull && git submodule update --recursive
Edit .gitignore file in root folder and add dirs/files you don't want to be in git repo Use ! to negate the pattern:
assets/* !assets/.gitignore protected/runtime/* !protected/runtime/.gitignore protected/data/*.db
Make your first commit
git commit -a "Initial version"
Keep in mind some database design best practices
http://www.yiiframework.com/wiki/227/guidelines-for-good-schema-design
Use migration for tracking database changes
http://www.yiiframework.com/doc/guide/1.1/en/database.migration
$yiic migrate create myNewTable
***Update database with new migrations after updating your repo
$yiic migrate
Secure your app
http://www.yiiframework.com/wiki/275/how-to-write-secure-yii-applications/