Sei sulla pagina 1di 21

Agenda

Overview of Source Control in TFS 2010


Introduction to Changesets and
Workspaces
Overview of Basic Source Control
Operations
Introduction to Branches and Merging

Microsoft Confidential

What is Source Control?


Source Control is the management of
changes to files and other project artifacts
and the tracking of different versions of
each file
Using source control management (SCM)
systems, a development team can keep
track of the changes and progress made
to their code and configuration files

Microsoft Confidential

Using Source Control, You Can


Check files 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 development
and merge changes between branches
4

Microsoft Confidential

Source Control in TFS 2010


Source control is a major component of
TFS 2010
The following source control concepts are
supported:
Branches
Concurrency
Labels
Isolation
Change Tracking
Atomic
Changesets
Shelving

Microsoft Confidential

What is a TFS 2010 Changeset?


A changeset is an atomic collection of
items that have been checked in to source
control
In addition to the files, the changeset
contains metadata about the date/time
and user who made the check-in
A changeset may be associated with work
items, and may contain a check-in
comment
6

Microsoft Confidential

What is a TFS 2010 Workspace?


A workspace is a mapping of files from the
source control repository to your local
machine
You may have multiple workspaces on a
single machine
The concept of workspaces provides
isolation for source on your local
machine

Microsoft Confidential

Source Control Operations Get


Latest
A Get Latest operation will copy the most
current version of files/folders from TFS
2010 to your workspace
For source-controlled folders, this operation
applies recursively to any other
files/folders below them

Microsoft Confidential

Source Control Operations Get


Latest (cont.)

Microsoft Confidential

Source Control Operations Get


Specific Version
A Get Specific Version operation will copy a
specific version of files/folders from TFS
2010 to your workspace
You may retrieve versions based on:

10

Their
Their
Their
Their
Their

Microsoft Confidential

most current contents


contents in a specific changeset
contents at a particular date and/or time
contents when a specific label was applied
contents in a particular workspace

Source Control Operations


Check Out
A check-out operation prepares the file for
editing in your workspace
In most cases, explicit check out is not
needed as the Visual Studio integration
does this for you automatically when you
start to modify a file.

11

Microsoft Confidential

Source Control Operations


Check Out

12

Microsoft Confidential

Source Control Operations


Check In
A check-in operation adds a new
changeset to the source control repository
The changeset will include the contents of
the checked-in files as they appear on your
workspace

13

Microsoft Confidential

Source Control Operations


Check In (cont.)

14

Microsoft Confidential

Source Control Operations


View History
A View History operation will display a list
of changesets for files/folders in TFS 2010
You can use the displayed changesets for
determining what changes were
performed by whom and when

15

Microsoft Confidential

Source Control Operations


View History (cont.)

16

Microsoft Confidential

What is a Branch?
A branch is a standalone copy of a sourcecontrolled file or folder, used to isolate
development efforts
Code changes can be merged between
different branches in the same source
control repository
Before setting up source-control for a
project, you need to consider your
branching plan
17

Microsoft Confidential

Branch Visualizations
TFS 2010 allows you to visually observe your
branches and the changesets associated with
them

18

Microsoft Confidential

What is Merging?
Merging is the act of combining changes
from multiple branches in a single source
file/folder
TFS 2010 will try to reconcile changes
automatically when merging
Sometimes, however you will need to
resolve conflicts manually

19

Microsoft Confidential

What is Merging? (cont.)

20

Microsoft Confidential

In Conclusion, Source Control


Allows You To
Manage distinct versions of your projects
code and non-code artifacts
View the state of your projects artifacts at
any point in time
Isolate development efforts into branches
that run in parallel
Merge changes between different
branches while resolving conflicts
21

Microsoft Confidential

Potrebbero piacerti anche