Ekin Koc
Ekin Koc

Reputation: 3007

Git Workflow for continuous development

We've been using Git for a node.js based web application. Our workflow is based on two brances, master and stable. We use master as the main development line and when we decide to release something, we go ahead and merge master into stable.

There are two servers, "staging" and "production", whenever we push, a post receive hook deploys master to staging server and stable to production.

The problem is, out master branch almost always has either experimental or non finished work on it. We need to push, in order to test the features on the actual server or just to show progress to administration. Now, when we need to merge to stable, it gets complicated.

What would be the best approach for this? A staging branch? How are we gonna pick some of the features from staging to go into master or stable? Should we use small feature branches for everything? Even if it's a single commit?

Upvotes: 1

Views: 308

Answers (2)

sjakubowski
sjakubowski

Reputation: 2943

Often features span multiple commits, and in this case it would be advisable to create a staging branch, merge feature branches into that (or cherry-pick in the case of individual commits) and then merge with production and test the staging branch and push into the production branch.

Upvotes: 1

swati
swati

Reputation: 1757

I think, No need to create small feature branches for everything , you can create new branch and pick the feature what you want from commit .

Use Git Cherry-Pick to pick some of the features from staging to go into master or stable

Upvotes: 1

Related Questions