Originally, I thought my problem was How to maintain branches in Apache's DocumentRoots? but realized the right question actually is How to use Git to deploy stuff to web -server such as Apache?.
I feel I have understood now the DocumentRoot -problem, it would require Apache hacking that I want to avoid because much simpler solution using side-effects and putting the repo outside the deployment -dir but now a problem to understand git-fetch-hook and how to deploy stuff if the outside thing is a large dir, perhaps just cp besides and then mv — but there must be some better way of syncing the deployment -dir, thinking.
DocumentRoot -problem
DocumentRoots specify the dirs in httpd.conf for hostable material.
Now in such folder, I want ticgit -branches and feature -branches.
When I create branches in some DocumentRoot, I get master and the
other branch mixed up.$ git checkout --orphan feature-0.01is not
empty but contains master -things.$ ti new ...creates a branch
that has stuff from master, apparrently some bug in Ticgit (it works
in small repos but creating ticgit -branch for larger repos like my
DocumentRoot results into havoc). So how do you maintain your braches in Apache’s DocumentRoot? Do you have your tickets there?
What about your feature -branches? Look I am puzzled by this,$ gitand now how does apache knows which files it
checkout feature-0.1
should host? Things in master or things infeature-0.1?My updated understanding of the DocumentRoot -problem
Now the problem with latter is that the deployment is not meant to
work like this. I know SethRobertson’s guide instructs some ways to
use git for deployment. I think they are the best methods so far
instead of hacking the Apache with git -repo inside the deployment
-dir (commonly www).
Do not develop inside your deployment -dir (commonly www in Apache). Develop elsewhere and use side-effects and proper version-control good-rules outlined in SethRobertson’s guide here, particularly the rule about deployment branch for version 1.0 and tagging so you maintain a timeline how things develop over time. He states a do-not for the activity to mess development and deployment below, probably not good thing for your users also (they probably not wanting to see your editing of the website while browsing).
SethRobertson’s guide states a DO-NOT for messing up deployment and development
So
Using Git to manage a web site-tutorial here, example here and here — but notice his warning"however, this does not give you atomic updates, synchronized db--".