SlideShare a Scribd company logo
Team Foundation Server Source ControlDhirendra SinghPrincipal Software EngineerZenevo Technologies
AgendaTFS- an OverviewManaging BranchesMergingCode Integration
What is Team Foundation Server?It is the “Glue” that connects our teamWhat am I supposed to do?What’s my progress?What’s broken?Helps manage project artifactsSource Control
Visual Studio Team System
How it is helping us?Helps our team communicate Centralized place to manage our projectData is captured automaticallyEveryone looks at the same dataIt is CustomizableArtifacts version/source controlMinimize / eliminate lost workReproducible builds & product state
Team Foundation ServerTeam Foundation ServerVersion ControlReporting and BITeam BuildWork Item TrackingTeam Portal
Team Foundation ServerDev Team (Remote)Dev Team  (Local)Build AgentWindows 2003 ServerSQL Server 2005IIS 6.0Business UserVersion Control Proxy (Remote)Active DirectoryHTTP / STCP/IPTeam Foundation Server
TFS Source Control: TerminologyWorkspacesArea on local disk where you edit filesCheck in / check outCheck out marks the beginning of your editsCheck in commits your changes to the repositoryTFS allows shared check outChangesetsGroup of changes that happen when you check inIt works similarly as LabelShelvingSimilar to check in Changes get stored on the server Not visible as part of the main project source treeFor the purpose of Park your changes & go aheadBranchingUsed to manage multiple versions of a productHelps in Release Process (Bug Fixes, Developing new features, Service Packs)8
TFS does more than just check-in and check-outBranching and mergingFacilitates simultaneous development of multiple versions of an applicationApplying LabelsCloakingShelve & Unshelve
What should go into source control?Solution files -- *.slnProject files -- *.csproj, *.vbprojSource Control Project Metadata (*.vspscc)Project bindingsSource control configurationApplication config files (*.config)Source files Project Binaries dependency references (e.g. Third Party dlls, Components)10
What shouldnot go in source control?Solution user option files (*.suo)Local user customizationsProject user option files (*.user)Local user customizationsWebInfo files (*.webinfo)Build outputs/bin/debug/bin/release/obj11
Client-side vs Server-side StructureDirectory structure should be the sameClient-side structure should match serverSimplifies “Get Latest”Everyone has the same directory layoutThis doesn’t mean that everyone has to put their source in the same place on diskThe relative paths should matchRoot path of source tree can be different12
Plan your RepositoryRecommended file structure for Version Control.
Recommended File Structure
Don’t Branch... untilYou have a good reasonLife only gets more complex with branchingFavor Labels over BranchesYou can always branch from a Label later15
When to branch…The Signs…Regular broken buildsFeatures in parallel development that need to edit one anotherBranch so that each feature can develop in isolationMerge changes laterAvoid source tree being polluted with experimental code. Allow work on different versions of product at same time Support maintenance releases etc Allow parallel DevelopmentAsk yourself if the productivity gained by the branch is balanced against the pain (anti-productivity) of merging changes back16
SO…IF YOU REALLY MUST BRANCH…17
Branching ScenariosNo BranchingEveryone works from the same codeBranch for ReleaseStabilization in order to prepare for a releaseBranch for MaintenanceMaintenance of a previous build/releaseService pack developmentBranch for FeatureBranch from the Trunk to develop a new feature (such as a new module in isolation)Merge back into the Trunk when feature is doneBranch for  Multiple TeamsBranches for multiple teams working on a set of features18
Branch For Release : Process\Main\Source\\Release 1\Source\\Release 2\Source\19
Branch For MaintenanceSimilar to Branch For Release\Main\Source\\Maintenance\Release 1\Source\Release 2\Source\20
Branch For FeatureBranching for development isolation\Main\Source\\Development\Feature 1\Source\Feature 2\Source\Feature 3\Source\21
Branch For Feature: The Process22
Branch For Teams\Main\Source\\Development\Team 1\Feature 1\Source\Feature 2\Source \Team 2\Feature 1\Source\Feature 2\Source \23
Branching OverkillMinimize the number of branchesWatch out for branching problemsMissed deadlines because the merge is too difficult, long, intricate, etcReleases take forever because fixes have to go through multiple layers of mergeYou’re simply spending too much time doing merges24
Branching and MergingSource: http://downloads.seapine.com/pub/papers/SCMBranchingModels.pdf
DemoCreate a branchMerge changesCreate/resolve a check-in conflictDiscussion about Baseless Merge
Some News…Bad newsSome features are command-line onlyGood newsThere’s a lot you can do from the command-lineScriptable
Beyond the GUITF.exe is your FriendThe most powerful for Team Foundation Source Control is the command line.
 TF.exeCommand-line interface to TFS source control30+ sub commandsKind of like “net” command in WindowsWhy would you want to use the command line version?It’s coolSome things aren’t available through the UIGood for automated operations (builds, etc)
The CommandsAddBranch / BranchesChangesetCheckin / CheckoutConfigureDelete / UndeleteDirGetHistoryLabel / Labels / UnlabelLockMerge / MergesMovePermissionPropertiesRenameResolveShelve / UnshelveStatusUndoViewWorkfoldWorkspace / Workspaces
Things you (probably) can’t do through the GUI Find files in TFS by name/wildcardtf dirGet particular version of a file(s) by wildcardtf getFind checked out / pending change filestf statusWhat will be changed by a “get latest”?tf get /previewBaseless mergestf merge /baselessEliminating a changeset from a mergetf merge /discard
And Last but not the Least…
Baby Come BackAccessing Deleted FilesTools, Options, Source Control, Show deleted items in Source Control Explorer.Undelete file.  Remember to add to solution…
Extending TFSUse the .NET object model to extend Team Foundation Server
Check out != Get Latestand AlsoCheck-in != Get Latest
Change != BadTFS is new and different – you folks will need time to adjust.
Best Practices- Referenceshttp://www.codeplex.com/TFSGuideLots of great infoFreeReleased Aug 200737
Question and AnswerDhirendra SinghPrincipal Software EngineerZenevo Technologies Pvt. Ltd.dheerendra.singh@zenevo.comSingh.dheerendra@gmail.comwww.zenevo.com

More Related Content

PPTX
Team foundation server
PPT
Team Foundation Server 2008 Overview
PPTX
Team Foundation Server 2010 - Version Control
PPTX
Working as a Team with Team Foundation Server 2010
PPT
Team Foundation Server Version Control
PDF
Team Foundation Server Fundamentals Overview(5 Sessions)
PPTX
What's new in ALM using Visual Studio 2013 and TFS 2013
PPTX
Install, configure and customize TFS 2013
Team foundation server
Team Foundation Server 2008 Overview
Team Foundation Server 2010 - Version Control
Working as a Team with Team Foundation Server 2010
Team Foundation Server Version Control
Team Foundation Server Fundamentals Overview(5 Sessions)
What's new in ALM using Visual Studio 2013 and TFS 2013
Install, configure and customize TFS 2013

What's hot (20)

PPT
Requirements and Team Foundation Server
PPT
TFS Administration Overview
PPTX
What's new in Visual Studio 2013 & TFS 2013
PPTX
Team Foundation Server 2010 - Overview
PPT
Vsts 2
PPT
The first looks at VSTS2010
PPT
Vsts Msdn Presentation2003
PPTX
Team Foundation Server 2013 Lansering
PPTX
Application Lifecycle Management with TFS
PPT
Integrated Proposal (Vsts Sps Tfs) - MS stack
PPTX
Developing Sandbox Solutions
PPTX
Overview of Visual Studio Team System 2010
PPTX
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?
PPTX
Workflow Manager 1.0 SharePoint 2013 Workflows
PPTX
Microsoft Stack Visual Studio 2010 Overview
PPTX
Windows Workflow Foundation
PDF
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
PPTX
Team Foundation Server - Tracking & Reporting
PPTX
Ci for force dot com
PPTX
20140211 BTUG.be - Workflow Manager
Requirements and Team Foundation Server
TFS Administration Overview
What's new in Visual Studio 2013 & TFS 2013
Team Foundation Server 2010 - Overview
Vsts 2
The first looks at VSTS2010
Vsts Msdn Presentation2003
Team Foundation Server 2013 Lansering
Application Lifecycle Management with TFS
Integrated Proposal (Vsts Sps Tfs) - MS stack
Developing Sandbox Solutions
Overview of Visual Studio Team System 2010
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?
Workflow Manager 1.0 SharePoint 2013 Workflows
Microsoft Stack Visual Studio 2010 Overview
Windows Workflow Foundation
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Team Foundation Server - Tracking & Reporting
Ci for force dot com
20140211 BTUG.be - Workflow Manager
Ad

Similar to Team Foundation Server - Source Control (20)

PPTX
TFS 2010: Team Development on Crack
PPTX
Que nos espera a los ALM Dudes para el 2013?
PPTX
TFS Source Control Management
PDF
Branching and Merging and Bears, Oh My!
PDF
SQL Server DevOps Jumpstart
PPTX
JavaEdge 2008: Your next version control system
PPT
Embracing Distributed Version Control
PPTX
02-version control(DevOps Series)
PPTX
Branching in TFS 2010 Part I (Branching Theory)
PDF
Chicago alm user group tfs version control poster - tfvc and git
PPT
Tfs development
PPTX
Introduction to Git
PPTX
Why we ditched TFS and embraced Git, Github, TeamCity and Myget
PDF
Introduction to Git
PPTX
Source control branching and merging guidelines
PDF
Pusheando en master, que es gerundio
PPTX
Source control - what you need to know
PPTX
Trunk Based Development in the Enterprise - Its Relevance and Economics
PPTX
Managing software product versioning with Gitflow, VSTS and Atlassian SourceTree
PPTX
Tfs session
TFS 2010: Team Development on Crack
Que nos espera a los ALM Dudes para el 2013?
TFS Source Control Management
Branching and Merging and Bears, Oh My!
SQL Server DevOps Jumpstart
JavaEdge 2008: Your next version control system
Embracing Distributed Version Control
02-version control(DevOps Series)
Branching in TFS 2010 Part I (Branching Theory)
Chicago alm user group tfs version control poster - tfvc and git
Tfs development
Introduction to Git
Why we ditched TFS and embraced Git, Github, TeamCity and Myget
Introduction to Git
Source control branching and merging guidelines
Pusheando en master, que es gerundio
Source control - what you need to know
Trunk Based Development in the Enterprise - Its Relevance and Economics
Managing software product versioning with Gitflow, VSTS and Atlassian SourceTree
Tfs session
Ad

Recently uploaded (20)

PDF
Machine learning based COVID-19 study performance prediction
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPT
Teaching material agriculture food technology
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Machine learning based COVID-19 study performance prediction
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Dropbox Q2 2025 Financial Results & Investor Presentation
Review of recent advances in non-invasive hemoglobin estimation
Mobile App Security Testing_ A Comprehensive Guide.pdf
Approach and Philosophy of On baking technology
Encapsulation_ Review paper, used for researhc scholars
Digital-Transformation-Roadmap-for-Companies.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Per capita expenditure prediction using model stacking based on satellite ima...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Teaching material agriculture food technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Understanding_Digital_Forensics_Presentation.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
NewMind AI Monthly Chronicles - July 2025
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...

Team Foundation Server - Source Control

  • 1. Team Foundation Server Source ControlDhirendra SinghPrincipal Software EngineerZenevo Technologies
  • 2. AgendaTFS- an OverviewManaging BranchesMergingCode Integration
  • 3. What is Team Foundation Server?It is the “Glue” that connects our teamWhat am I supposed to do?What’s my progress?What’s broken?Helps manage project artifactsSource Control
  • 5. How it is helping us?Helps our team communicate Centralized place to manage our projectData is captured automaticallyEveryone looks at the same dataIt is CustomizableArtifacts version/source controlMinimize / eliminate lost workReproducible builds & product state
  • 6. Team Foundation ServerTeam Foundation ServerVersion ControlReporting and BITeam BuildWork Item TrackingTeam Portal
  • 7. Team Foundation ServerDev Team (Remote)Dev Team (Local)Build AgentWindows 2003 ServerSQL Server 2005IIS 6.0Business UserVersion Control Proxy (Remote)Active DirectoryHTTP / STCP/IPTeam Foundation Server
  • 8. TFS Source Control: TerminologyWorkspacesArea on local disk where you edit filesCheck in / check outCheck out marks the beginning of your editsCheck in commits your changes to the repositoryTFS allows shared check outChangesetsGroup of changes that happen when you check inIt works similarly as LabelShelvingSimilar to check in Changes get stored on the server Not visible as part of the main project source treeFor the purpose of Park your changes & go aheadBranchingUsed to manage multiple versions of a productHelps in Release Process (Bug Fixes, Developing new features, Service Packs)8
  • 9. TFS does more than just check-in and check-outBranching and mergingFacilitates simultaneous development of multiple versions of an applicationApplying LabelsCloakingShelve & Unshelve
  • 10. What should go into source control?Solution files -- *.slnProject files -- *.csproj, *.vbprojSource Control Project Metadata (*.vspscc)Project bindingsSource control configurationApplication config files (*.config)Source files Project Binaries dependency references (e.g. Third Party dlls, Components)10
  • 11. What shouldnot go in source control?Solution user option files (*.suo)Local user customizationsProject user option files (*.user)Local user customizationsWebInfo files (*.webinfo)Build outputs/bin/debug/bin/release/obj11
  • 12. Client-side vs Server-side StructureDirectory structure should be the sameClient-side structure should match serverSimplifies “Get Latest”Everyone has the same directory layoutThis doesn’t mean that everyone has to put their source in the same place on diskThe relative paths should matchRoot path of source tree can be different12
  • 13. Plan your RepositoryRecommended file structure for Version Control.
  • 15. Don’t Branch... untilYou have a good reasonLife only gets more complex with branchingFavor Labels over BranchesYou can always branch from a Label later15
  • 16. When to branch…The Signs…Regular broken buildsFeatures in parallel development that need to edit one anotherBranch so that each feature can develop in isolationMerge changes laterAvoid source tree being polluted with experimental code. Allow work on different versions of product at same time Support maintenance releases etc Allow parallel DevelopmentAsk yourself if the productivity gained by the branch is balanced against the pain (anti-productivity) of merging changes back16
  • 17. SO…IF YOU REALLY MUST BRANCH…17
  • 18. Branching ScenariosNo BranchingEveryone works from the same codeBranch for ReleaseStabilization in order to prepare for a releaseBranch for MaintenanceMaintenance of a previous build/releaseService pack developmentBranch for FeatureBranch from the Trunk to develop a new feature (such as a new module in isolation)Merge back into the Trunk when feature is doneBranch for Multiple TeamsBranches for multiple teams working on a set of features18
  • 19. Branch For Release : Process\Main\Source\\Release 1\Source\\Release 2\Source\19
  • 20. Branch For MaintenanceSimilar to Branch For Release\Main\Source\\Maintenance\Release 1\Source\Release 2\Source\20
  • 21. Branch For FeatureBranching for development isolation\Main\Source\\Development\Feature 1\Source\Feature 2\Source\Feature 3\Source\21
  • 22. Branch For Feature: The Process22
  • 23. Branch For Teams\Main\Source\\Development\Team 1\Feature 1\Source\Feature 2\Source \Team 2\Feature 1\Source\Feature 2\Source \23
  • 24. Branching OverkillMinimize the number of branchesWatch out for branching problemsMissed deadlines because the merge is too difficult, long, intricate, etcReleases take forever because fixes have to go through multiple layers of mergeYou’re simply spending too much time doing merges24
  • 25. Branching and MergingSource: http://downloads.seapine.com/pub/papers/SCMBranchingModels.pdf
  • 26. DemoCreate a branchMerge changesCreate/resolve a check-in conflictDiscussion about Baseless Merge
  • 27. Some News…Bad newsSome features are command-line onlyGood newsThere’s a lot you can do from the command-lineScriptable
  • 28. Beyond the GUITF.exe is your FriendThe most powerful for Team Foundation Source Control is the command line.
  • 29. TF.exeCommand-line interface to TFS source control30+ sub commandsKind of like “net” command in WindowsWhy would you want to use the command line version?It’s coolSome things aren’t available through the UIGood for automated operations (builds, etc)
  • 30. The CommandsAddBranch / BranchesChangesetCheckin / CheckoutConfigureDelete / UndeleteDirGetHistoryLabel / Labels / UnlabelLockMerge / MergesMovePermissionPropertiesRenameResolveShelve / UnshelveStatusUndoViewWorkfoldWorkspace / Workspaces
  • 31. Things you (probably) can’t do through the GUI Find files in TFS by name/wildcardtf dirGet particular version of a file(s) by wildcardtf getFind checked out / pending change filestf statusWhat will be changed by a “get latest”?tf get /previewBaseless mergestf merge /baselessEliminating a changeset from a mergetf merge /discard
  • 32. And Last but not the Least…
  • 33. Baby Come BackAccessing Deleted FilesTools, Options, Source Control, Show deleted items in Source Control Explorer.Undelete file. Remember to add to solution…
  • 34. Extending TFSUse the .NET object model to extend Team Foundation Server
  • 35. Check out != Get Latestand AlsoCheck-in != Get Latest
  • 36. Change != BadTFS is new and different – you folks will need time to adjust.
  • 38. Question and AnswerDhirendra SinghPrincipal Software EngineerZenevo Technologies Pvt. Ltd.dheerendra.singh@zenevo.comSingh.dheerendra@gmail.comwww.zenevo.com