Reputation: 417
We are using Team Foundation Server and have some files being developed that we want under version control. We don't want these files being accidentally pushed into production. We plan on deploying them but right now they would break the web application. What is the best (simplest) way to version these files while avoiding the chance of them being accidentally deployed?
Upvotes: 0
Views: 1152
Reputation: 22245
Limit who has privileges to deploy to production.
Putting files in TFS for version control won't deploy them to production. Only somebody with permissions in your production environment can deploy to prod.
What it sounds like you're saying is you have one version of code that you want to push to production, and another copy of the code with changes that you don't want to push to production yet (if you only had one version of the code, then you simply don't deploy until ready and problem solved)
If that is the case, then what you need is branches. You have a branch for each separate version of the codebase that you are working on concurrently. This can get complicated, because you have many options for how to structure your branching strategy, that can have significant implications on your development workflow. See the TFS Rangers Branching Guidance for more info.
The simplest branching structure if you only have the two versions of your codebase, would be a trunk/MAIN branch, then a DEV branch off of that. Trunk/MAIN is what you push to production, DEV is where you do your development work. And only merge into MAIN when you are ready to publish the changes to production.
Upvotes: 1
Reputation: 109
The easy way is to shelve the changes. However, next best way (I would recommend) is to do the following:
Keep the base code branch as your "trunk" branch and that is where the code gets kept that is 100% development and never gets into production by accident. (Check in early and often.)
Upvotes: 1