Best practice for three environment setup

I am fairly new with git, and am not quite sure what is the best way to go about doing what I need to do. So the setup I have is this: I have my localhost where I do the work, then I have a test environment where the client can test out new functionality, then I have the production environment. The production environment has just recently gone live and until then I was pushing everything to the live and test servers as soon as it was working (simply tested by me) which was ok since the system wasn't 100% live yet. Now the client wants me to push everything to the test server and allow them to test it and let me know which parts are ready to go live and which parts still need work. What is the best way to handle this without accidentally pushing things to the live server that are not ready yet but have already been pushed to the test server. I thought I could just create branches while I was working on things and when I had it working merge it into the testing branch and push it to the test server, and remove the feature branch, but then I seem to have to push it all to the production branch all at once instead of picking which features I want and only pushing those live. Here are the options I can think of: Option 1 - Create a new branch for each and every bug fix and feature request and merge them to the testing branch for testing and then merge them individually with the production branch after each has been tested. Option 2 - Tell the client that I have to push a large batch of updates at once not just one or two as they pick and choose. (obviously not the best option) The problem I have with option 1 is that, I assume I would have to create each branch off the master or production branch and that some fixes or features might be dependent upon other things that have already been fixed in dev branch but have not pushed to production yet. I'm hoping that I am missing some functionality of git that will help out in situations like this. Any suggestions would be greatly appreciated. Thanks in advance.

Last updated

1-2 of 2

Reply to this discussion

You cannot edit posts or make replies: You should be logged in before you can post.

Post a reply