local
- [dev]
- [staging.foo.com]
- [foo.com]
remote
- [staging.foo.com]
- [foo.com]
I’m new to git so please tell me if I’m over complicating this. I really want to setup something like this for myself but I’ve spent all day trying to figure this out and have it all working. [] being separate directories.
Locally I want the dev that I would commit to staging. Then push staging to remote staging to test. Then once everything was gold, I’d push the local staging out live. The live would also be copied over to local to keep the dev workflow separate. Does this make sense?
Would I set this up as branches?
Segregating feature code from devel code from staging code from release from stable code is a job much better suited for branches. See: http://nvie.com/posts/a-successful-git-branching-model/ this is pretty much the cannonical way to handle that sort of thing.
So in your setup, I’d just have your local git repo and a centeral repository, then use branches to keep things organized.