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?
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