Michelle
Michelle

Reputation: 2235

Two developer GIT workflow and setup with automatic deployment

We're two developers working on a website. I've been through the progit book but I'm battling to understand what would be the correct workflow and setup for us. We would like the production and staging servers to be automatically updated when we do the relevant commits. Any advice on how we could optimize this workflow or if we are doing anything wrong would be greatly appreciated. My current thoughts are below:

Local workstations

local repo branches

Workflow

  1. General development is done by branching off master and merging changes back in.
  2. When ready to share updates with partner and test on live web server, push master to origin.
  3. When testing is complete on web server, merge master into production and push production to origin.

Web server (origin)

Upvotes: 1

Views: 201

Answers (1)

Jonas Schäfer
Jonas Schäfer

Reputation: 20738

In accordance with a successful git branching model by nvie.com, we branch off devel and have master as production branch.

Additionally, we hooked into post-update to trigger deploy and building of docs, which then happens deferredly (publish/subscribe via XMPP).

Otherwise it's really the same and looks pretty sensible to me.

Upvotes: 1

Related Questions