Hi
Currently my website (production server) already have a lot of code in it. And now I want to start using Git for my projects and setup a staging server for my team. Can anybody give me any advise?
Here is the picture in my mind:
Production - Prodcution server which already have codes
↑
Staging - New staging server, will install Trac too
↗↙ ↖↘
Developer1 Developer2 - Local development
My question is, how should I start?
Here are some steps in my mind:
- do a
git init
in production server (is this safe?) clone
the repo from production to staging server- developers
clone
the repo from the staging to their local machine push
files to the staging server after finish changing- when staging is ready,
push
everything to the production
Does this work flow makes sense, or there are some better way to do it?
What if I only want to change one file?
Does orgin/master has anything to do with it in this process?? Who is the orgin? am I going to end up having multiple orgin??
Also, when should a developer use branch
in this case?