I’m having this thinking over year now, and would like to ask if there’s anyone who has any advice or experience on how the continue deployment workflow in GIT.
My Server Structure.
I got a Test Server and Production Server.
Test Server is a mirror of Production Server, which has the latest version of my project.
There are other unfinish stories on the Test site (ongoing development stories)
Senario
I have a new user story to change the login page title from “login” to “secure login”
I went in to my Test Server and checkout a branch from master called “hotfix_login_text”
I done the change and ask my tester to test my story on the Test site.
Tester has accepted my login page text change story.
Now I need to release that login page text change to our production site.
Remember there are other stories are still under development on the Test site as well and also on the same branch were my login text change is currently located.
How can I release my login text change to our production site without including my incomplete stories?
The way I’m currently doing is manually
copy the login.php file to a new copy of our production site directory
which is clean and then commit from there to our productions site.
I hope my explanation above is clear enough.
Your help will be much appriciated.
Finau
There are a couple ways to do this. One way would would be to put each of your user stories on separate branches, and your production code on another branch. When a feature is completed and accepted, merge the user story branch into the production branch.
The other way to do it would be to cherry pick your commits from your development branch into your production branch. See the git cherry pick man page for details.. Only cherry pick the commits which relate to the completed user story.
Note that none of these will work if you combined work on multiple features into a single commit. In this case, there’s no way to pick out individual files without doing it manually.