user3900456
user3900456

Reputation: 2003

How to keep 2 versions of source code in TFS

I'm new to TFS and I need to have a new "copy" of the source code in order to make some fixes/add new features that will later be tested and decided if the feature/fix will be commited to the main copy of the source control.

I want this main copy to be used as the source code that will be compiled and deployed to the production server, and this new copy will be for this end.

Later if the changes are approved by the client, I want to commit them to the main copy to have them deployed to the production server.

I'm pretty sure there is a feature in TFS that will do it easily, but I need some help.

Upvotes: 1

Views: 453

Answers (2)

Giulio Vian
Giulio Vian

Reputation: 8343

There is no clear cut answer as you must consider the entire process, especially how much you are freezing a version of the code, how do you enhance the new codebase etc. I wholeheartedly suggest to study ALM Rangers' Version control guidance, because it distills the experience of many different people and customer scenarios (much more than the sheer number of authors, trust me). After that, implement the chosen strategy and follow it by the book.

Upvotes: 3

DaveE
DaveE

Reputation: 3637

If you expect this to be quick and without a lot of changes, you may be talking about a shelveset. You make changes in your local copy and save them as a "shelveset". When you want to build without them, get latest and build. When you want to build with them, you get latest, unshelve your changes locally and build. When you're ready to check them in, unshelve them and check them in.

If this is going to take some time, a branch might be a better bet. When you're done with your edit/test cycle, you merge the changes back to your main branch and check them in.

Upvotes: 2

Related Questions