I've tried now for several hours understanding how to use Git with webfaction. And even with the documentation I cannot get it to work.
I have a Django app at: webapps/django_app/project_name/
I have a Git repo at: webapps/git_app/repos/my_repo.git
I assume the following workflow:
Is this correct ? (New to git)
Some really newbie questions there, but hope to get some help!
asked Dec 28 '10 at 19:10
For updating your Django (or any) application directly when you push to your git repository, I prefer the method described at:
In a nutshell, you would create a post-receive hook that looks something like:
Replacing "username" with your username, "django" with your django web application's name, and "myproject" with the django project name.
You would specifically be committing the django project to git ("myproject" in this example), and not the entire /home/username/webapps/django application directory (which includes extra things such as the private apache server which runs your application).
The post-receive hook to update would be the file at:
where "username" is your username, "git" is your git application's name, and "djangorepo.git" is the name of the git repository you're using for your django project directory.
You will also need to ensure that the hook is executable:
Hope that helps!
Our official documentation on GIT is here,
You should be able to simply push and pull your code using SSH. This section specifically should answer your questions with examples,
answered Dec 28 '10 at 20:10
How do you include the static files in the Git repo, while having a separatie static files app? What I mean is, in my local environment I have the static files folder in my project folder like:
But on Webfaction the static folder is a separate app so nginx handles the static files. But then we have the problem that with ryans solution that an automatic gitcheckout won't work (it works, but it will create a