- 21. Feb
- 14:43
- 2010
Updated- 21. Feb
- 14:52
- 2010
My GIT
This post will explain how I use git to versioncontrol my different projects.
Usually I have my websites organised like this
/home/sites/DOMAIN
then every domain contains
- /bin/ - needed for virtualenv
- /git/ - here I host my git repository
- /include/ - again only because of virtualenv
- /lib/ - same here
- /PROJECTNAME/ - here I usually have the site-app (which is a clone of the above git directory)
- /src/ - for every third party package which is used, may it be python, a C library or whatever
On my PC I usually have things organised like this
~/projects/websites/projectname
Now what I really like is that I have 2 levels my code has to pass before it enters production.
- We have the local level on my PC, where testing happens
- After we pushed the code to the server, I can quickly clone it to another folder and do a runserver to test production settings. Really, you can never be sure that your code works 100% on another machine, although unittests help a lot to simplify testing.
Then I pull the code from inside the /home/sites/DOMAIN/PROJECTNAME/ directory, restart the fcgi server.. et voila!
I feel very comfortable with this way and I think I might not change this in a long long time. However I'm very open to see other structures or usages. Anyway what I have to admit is that I did not yet look into is fabric, which I think is definitly missing in the staging process.