I am not an expert in Git, but I have seen this done before (I just didn't know the actual implementation behind it).
I have my main website at www.foobar.com but I want to have a testing subdomain at beta.foobar.com (or if that's too complicated, a testing dir at foobar.com/beta)
Is there a way to have 2 branches in my Git repo that manage the main website and a subdomain so that I can do all my testing in beta, and when I find my code satisfactory, I can simply merge beta in the master branch?
If I am thinking about this problem the wrong way, please feel free to propose an alternative. Thanks!