1

I'm totally new to Git. I have a production server, a dev server then one other developer (2 total). I'm thinking I need to set up my main repository on my production server as the production branch, then the development server as the dev branch/repo, then when myself or the other developer connects, we connect & get the dev branch/repo and run from there.

Does that sound like a correct way of doing such a thing? How do I do that?

2 Answers 2

4

Remembering that git is not a web deployment system, here is how one person did such a thing.

http://toroid.org/ams/git-website-howto

Also: http://nvie.com/posts/a-successful-git-branching-model/

and http://progit.org/

2
  • 1
    +1 for Pro Git. @snow_mac: read chapters 1-4 of the book immediately. Jun 28, 2011 at 16:56
  • I second that. Chapter 1 to 3 would get you started on basics, and 4th to learn how to setup git as a server.
    – rtn
    Jun 28, 2011 at 17:39
0

From my point of view a soruce control system is independent of the deployment infrastructure.

To make life more easier, I would setup one Git server which handles all the different repositories. Of course I would build the structure of the repositories according to some best practices/requirements.

For example:

  • master (could be development branch)
  • Production_Master (branch of master at point x, used for hotfix and changes required for the next release)
  • Production (always the point of deployment on the productive server)

How you split up your deployment server is not related of how you have the Git server. If you'd like to restrict who of your two member team has access, then I suggest doing this with permissions.

4
  • How is having one central Git Server different from SVN?
    – Snow_Mac
    Jun 28, 2011 at 17:09
  • Commits. You work locally on your local branch but push in the end to a centralized Git server (for backup, source code rights, ...). But the work is done locally on your development machine (and probably not on the server).
    – rit
    Jun 28, 2011 at 17:28
  • Where would the repos live? On dev? On Production?
    – Snow_Mac
    Jun 28, 2011 at 17:48
  • On your local development machine and on the Git server. Where you put the git server is up to you, but definitly not on production as it could interfer probably with your server setup. Therefor I would setup it on the development machine if you have enough hardware.
    – rit
    Jun 28, 2011 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.