taking your version control to a next level with tfs and git

Post on 20-Nov-2014

4.466 Views

Category:

Technology

4 Downloads

Preview:

Click to see full reader

DESCRIPTION

This are the slides of my Visug (Visual Studio User Group) session about how yo can leverage the power of Git with TFS 2013/Visual Studio online and Visual Studio.

TRANSCRIPT

Taking your source control to a next level

with TFS and Git

Alexander Vanwynsberghe

Houthulst

Working @ Cronos

ALM (MVP) and ESN

@Vanwynsberghea

www.alexandervanwynsberghe.be

Who Am I?

Source Control

Source control inggggggg

ggg gg ggg gg .

ggg gggg gggggg gggggg

ggg gggg ggg gggggggg gg gggggggggg

ggggggggggg gg ggg gg -gggggggggggg

Agenda

Source Control Models

Centralized

Distributed

Back in the old days

Prior to TFS

“SourceSafe gives you the illusion of safety and control, while exposing

your project to risk”

“SourceSafe teaches developers bad habits like: avoid branching, exclusive

locks, easy permanent deletions”

Codinghorror.com

Visual Studio 2005 Team System

Visual Studio 2008 Team System

Visual Studio Team Foundation Server 2010

TFVC

Centralized Version Control Systembased on (server) workspaces

Add

Pending Change

Check-inHistory

Changeset

Check-out

Check-out lock

Compare

Label

Rollback

Cloak

Shelving

Disadvantages

Offline scenario’s

Read-only files

You need Visual Studio (or TEE or the Power Tools for Shell integration)

12

3

Server Workspaces

• You talk to TFS when you check-out

• Allows you to do security on check-out

• Visibility at all times into what everyone is doing

• Great for large codebases

Visual Studio Team Foundation Server 2012

TFVCLocal Workspaces

V2

Centralized Version Control Systembased on (local) workspaces

$TF

Local Workspaces

• Default for TFS 2012

• No explicit checkout = easy to edit outside ofVisual Studio or Eclipse

• Get Latest & Check in Compares local cache against the server

• Problematic for large codebases

Centralized Version Control

Strengths Best for

Server Workspace

Local Workspace

• Scales to very large codebases

• Fine level permission control

• Allows usage monitoring

• Large integrated codebases

• Control and auditability over source code down to the file level

• Offline editing support

• Easy to edit files outside Visual Studio or Eclipse

• Medium-sized integrated codebases

• A balance of fine-grained control with reduced friction

Conclusion

if (number of files > 100,000 ) || (locking = required)) { return “consider server workspace”;}else {

return “consider local workspace”;}

If you really want TFVC

Server vs Local Workspaces

App Architecture: suite of loosely coupled systems

Team: Written by small/discrete and distributed

Platforms: Multiple platforms and dev environments (Windows, iOS, Android)

Open source components

Modern Apps and OSS workflows

There were 2 players

Git

Git is the Leading DVCS Tool Adoption of Git is growing exponentially

Git as a Deployment Protocol Used to deploy web applications on many

cloud providers (Windows Azure, Heroku, Facebook)

Git has support across platforms

Git took off

There were some principles

100% true Git join the community

Team Foundation Server 2013 & Visualstudio.com

Git100%

Visual Studio 2012 (+Tools for Git) & Visual Studio 2013

Strengths Best for

Git

DistributedVersion Control

• Full offline experience

• Complete repository with portable history

• Simplified branching model

• Modular codebases

• Integrating with open source

• Highly distributed teams

Fully integratedGit support

Team Foundation Server / VisualStudio online

Project 2

Issues

Project

MgmtBuild

Git SCC Provider

Project 1

Issues

Project

MgmtBuild

Git

3rd Party XCode

Eclipse

Shell

3rd Party Eclipse

Shell

… TFVC

……

TFS SCC Provider

Team Explorer

TFVC Object Model

Local Repo

LibGit2 / LibGit2Sharp

Other Remote

Git Repo

Git-TF

Team Foundation Server 2013 & Visualstudio.com

Web interface

Migration & Web Interface

for dummies

initclonecommit

fetchpullpush

Git TFVCcommit /

push check-in

fetch get-latest

pullget-latest +

merge

Super Simple Git Workflowfor the lone wolf

init/clone

add

commit

push

Staged

To a remote

Super Simple TeamWorkflowfor the hyper agile team

init/clone

add/commit

pull

push

Feature BranchesShort lived, Isolated Sandboxes

init/clone

branch checkout

add/commit

checkout

merge

push

Clone the code

Push the modifications

Everything is synchronized

Branches

Using Git with Visual Studio

TFS Build, Deployment & Cross-platform

TFS Build

Deployment protocol

Cross-platform

TEE EGit

TFS Build + Cross-platform

Enterprise class support

Ease of installationSupport and servicingEase of managementIntegrated AuthenticationEnhanced permissionsALM Integration

I want to.. In Visual Studio? Command promptGet information about your local repository (such as the remotes you are tracking)

If the repository is in a TFS team project, then yes. Otherwise, no.

git-remote

Apply a tag to a commitNo, but you can view them.

You can use the command prompt to push, edit, and remove tags.

Create or edit a note NoYou can use the command prompt to push, edit, and remove notes

Amend your last commit No git-commit

Undo a committed change by applying the inverse of the commit.

No git-revert

Re-order history or combine (squash) commits.

No Rebasing

Team Foundation Version Control

Git(hosted by TFS)

When to Pick

TFVC• Developers familiar with

Centralized version control

• Highly coupled codebase

• Tight audit/control requirements

• Use of MyWork + Code Review

Git• Developers want to use it

• Using tools with built-in Git support

• XCode / iOS Development

Remember

Source Control is only a part of an ALM

solution!

Thanks!Vanwynsbergheawww.alexandervanwynsberghe.be

top related