26.04.2015 Views

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

To branch from Source Control Explorer, right-click the top-level folder containing your<br />

project source, click Branch, and then specify a target folder location <strong>with</strong> a folder name<br />

to indicate the purpose of the branch; for example, MyProject_Release1.0_Branch.<br />

To branch from the command line, use the tf branch command from a <strong>Visual</strong> <strong>Studio</strong><br />

2005 Command Prompt; for example:<br />

tf branch C:\MyProject $/MyProject_Release1.0_Branch<br />

Use branches only when you need to provide isolation while you do parallel<br />

development. When using branches you will have to eventually merge the changes to the<br />

main branch and as merging incurs overhead and requires you to manage conflicts, do not<br />

branch unless you need the file isolation that branching provides. You can label a build<br />

and branch later if needed.<br />

Additional Resources<br />

• For an introduction to branching and merging, see “Branching and Merging Primer”<br />

at http://msdn2.microsoft.com/en-us/library/aa730834(VS.80).aspx<br />

• For more information about branching, see “How to: Branch Files and Folders” at<br />

http://msdn2.microsoft.com/en-us/library/ms181425(VS.80).aspx<br />

• For more information about merging, see “How to: Merge Files and Folders” at<br />

http://msdn2.microsoft.com/en-us/library/ms181428(VS.80).aspx<br />

• For additional descriptions of how to branch and merge in <strong>Visual</strong> <strong>Studio</strong> 2005, see<br />

“Branching and Merging <strong>Team</strong> <strong>Foundation</strong> Source Control” at<br />

http://msdn2.microsoft.com/en-us/library/ms181423(VS.80).aspx<br />

How to Plan Your Branching Structure<br />

Branches are a mechanism to enable isolation; they are used to allow multiple developers<br />

to work on the same files in isolation. To plan your branching approach, evaluate<br />

common branching scenarios and choose a strategy based on team size, composition,<br />

release schedule, and build stability requirements.<br />

Common branch scenarios include:<br />

• Release – Branch to stabilize code you want to release. You can branch before<br />

release, avoiding the need to lock down the main branch.<br />

• Maintenance – Branch to maintain a previously released build.<br />

• Feature – Branch to isolate feature development that might make the rest of the<br />

project unstable.<br />

• <strong>Team</strong> – Branch to isolate sub-teams so that they can work <strong>with</strong>out being subject<br />

to breaking changes, or that they can work towards unique milestones. These are<br />

very similar to feature branches.<br />

Do not branch unless it becomes necessary for your development team. Branching<br />

introduces additional source tree maintenance and merging tasks. Most development<br />

teams working on short release cycles (e.g., Line-of-Business [LOB] applications) will

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!