Reputation: 31367
I'm developing a PHP application in a IDE, and want to use Git for version control.
How should I arrange my repository layout?
Should the Git repository root be the same as the project root on our IDE, or a sub- or superdirectory?
Upvotes: 1
Views: 289
Reputation: 4551
I would recommend a git repository lay out with the project name as the root, under which all your source would lie, including cron jobs, db scripts, unit tests, library code as well as the PHP source in your www root. For example:
projectName
|
+ cron jobs
+ db_scripts
+ libs (third party libraries)
+ php library code (e.g. database access, models, utilities etc)
+ tests
+ www_root
|
+ images
+ etc...
index.php
...
+ etc...
Upvotes: 2
Reputation: 336
Your git repository should contain everything you'd possibly want under version control. This definitely includes your source files, but most likely does not include the compiled binaries.
Personally, I put the repository root at the root of the source folder, because these are the only files I need version control for.
Upvotes: 1