source control with tfs 2010

Upload: janko-svetlik

Post on 01-Jun-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 Source Control With TFS 2010

    1/21

  • 8/9/2019 Source Control With TFS 2010

    2/21

    Agenda

    Overview of Source Control in TFS 2010 Introduction to Changesets and

    Workspaces

    Overview of Basic Source ControlOperations

    Introduction to Branches and Merging

    Microsoft Confidential2

  • 8/9/2019 Source Control With TFS 2010

    3/21

    What is Source Control?

    Source Control is the management ofchanges to files and other project artifactsand the tracking of different versions of

    each file Using source control management (SCM)systems, a development team can keeptrackof the changes and progress made

    to their code and configuration files

    Microsoft Confidential3

  • 8/9/2019 Source Control With TFS 2010

    4/21

    Using Source Control, You Can

    Checkfiles in and out of a repository Retrieve the latest version of a file or

    directory, or any other specific version

    View change history on a file or folder when it was changed and by whom

    Compare different versions of the same file

    to see changes Create branches for isolated developmentand merge changes between branches

    Microsoft Confidential4

  • 8/9/2019 Source Control With TFS 2010

    5/21

    Source Control in TFS 2010

    Source control is a major component ofTFS 2010

    The following source control concepts are

    supported:

    Microsoft Confidential5

    Concurrency

    Isolation

    Change Tracking

    AtomicChangesets

    Shelving

    Branches

    Labels

  • 8/9/2019 Source Control With TFS 2010

    6/21

    What is a TFS 2010 Changeset?

    A changeset is an atomic collection ofitems that have been checked in to sourcecontrol

    In addition to the files, the changesetcontains metadata about the date/timeand user who made the check-in

    A changeset may be associated with workitems, and may contain a check-incomment

    Microsoft Confidential6

  • 8/9/2019 Source Control With TFS 2010

    7/21

    What is a TFS 2010 Workspace?

    A workspace is a mapping of files from thesource control repository to your localmachine

    You may have multiple workspaces on asingle machine

    The concept of workspaces providesisolation for source on your localmachine

    Microsoft Confidential7

  • 8/9/2019 Source Control With TFS 2010

    8/21

    Source Control Operations GetLatest

    A Get Latest operation will copy the mostcurrent version of files/folders from TFS

    2010 to your workspace For source-controlled folders, this operation

    applies recursively to any otherfiles/folders below them

    Microsoft Confidential8

  • 8/9/2019 Source Control With TFS 2010

    9/21

    Source Control Operations GetLatest (cont.)

    Microsoft Confidential9

  • 8/9/2019 Source Control With TFS 2010

    10/21

    Source Control Operations GetSpecific Version

    A Get Specific Version operation will copy aspecific version of files/folders from TFS

    2010 to your workspace You may retrieve versions based on:

    Their most current contents

    Their contents in a specific changeset

    Their contents at a particular date and/or time

    Their contents when a specific label was applied

    Their contents in a particular workspace

    Microsoft Confidential10

  • 8/9/2019 Source Control With TFS 2010

    11/21

    Source Control Operations Check Out

    A check-out operation prepares the file forediting in your workspace

    In most cases, explicit check out is notneeded as the Visual Studio integrationdoes this for you automatically when youstart to modify a file.

    Microsoft Confidential11

  • 8/9/2019 Source Control With TFS 2010

    12/21

    Source Control Operations Check Out

    Microsoft Confidential12

  • 8/9/2019 Source Control With TFS 2010

    13/21

  • 8/9/2019 Source Control With TFS 2010

    14/21

    Source Control Operations Check In (cont.)

    Microsoft Confidential14

  • 8/9/2019 Source Control With TFS 2010

    15/21

    Source Control Operations View History

    A View History operation will display a listof changesets for files/folders in TFS 2010

    You can use the displayed changesets fordetermining what changes wereperformed by whom and when

    Microsoft Confidential15

  • 8/9/2019 Source Control With TFS 2010

    16/21

    Source Control Operations View History (cont.)

    Microsoft Confidential16

  • 8/9/2019 Source Control With TFS 2010

    17/21

    What is a Branch?

    A branch is a standalone copy of a source-controlled file or folder, used to isolatedevelopment efforts

    Code changes can be merged betweendifferent branches in the same sourcecontrol repository

    Before setting up source-control for a

    project, you need to consider yourbranching plan

    Microsoft Confidential17

  • 8/9/2019 Source Control With TFS 2010

    18/21

    Branch Visualizations

    TFS 2010 allows you to visually observe yourbranches and the changesets associated withthem

    Microsoft Confidential18

  • 8/9/2019 Source Control With TFS 2010

    19/21

    What is Merging?

    Merging is the act of combining changesfrom multiple branches in a single sourcefile/folder

    TFS 2010 will try to reconcile changesautomatically when merging

    Sometimes, however you will need toresolve conflicts manually

    Microsoft Confidential19

  • 8/9/2019 Source Control With TFS 2010

    20/21

    What is Merging? (cont.)

    Microsoft Confidential20

  • 8/9/2019 Source Control With TFS 2010

    21/21

    In Conclusion, Source ControlAllows You To

    Manage distinct versions of your projectscode and non-code artifacts

    View the state of your projects artifacts atany point in time

    Isolate development efforts into branchesthat run in parallel

    Merge changes between differentbranches while resolving conflicts

    Microsoft Confidential21