I'm working on a relatively small, but fast-changing project (a web application) with a few other developers. We're using Git for source control.
We started out creating a stable branch which is what is deployed to the live production web server. The master branch is what is deployed to a secondary "unstable" server for testing purposes. Whenever we felt that the master branch was ready to go live, we merged it into stable.
However, we came to a point where we wanted one of the later master commits, but not some of the commits before it, so we used cherry-pick
to pull that change into stable. This creates a new commit with the same change as the one in master, and it feels as if we're losing the nice history that Git otherwise provides.
Are there better ways of handling this type of unstable/stable deployment model?
One solution I thought of was using feature branches, and only ever merging a feature branch into master once we want it to go live. Then we'll tag
every deployment instead of having a stable branch.