taking your version control to a next level with tfs and git
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
![Page 1: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/1.jpg)
Taking your source control to a next level
with TFS and Git
![Page 2: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/2.jpg)
Alexander Vanwynsberghe
Houthulst
Working @ Cronos
ALM (MVP) and ESN
@Vanwynsberghea
www.alexandervanwynsberghe.be
Who Am I?
![Page 3: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/3.jpg)
Source Control
![Page 4: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/4.jpg)
Source control inggggggg
ggg gg ggg gg .
ggg gggg gggggg gggggg
ggg gggg ggg gggggggg gg gggggggggg
ggggggggggg gg ggg gg -gggggggggggg
Agenda
![Page 5: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/5.jpg)
Source Control Models
Centralized
Distributed
![Page 6: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/6.jpg)
![Page 7: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/7.jpg)
Back in the old days
![Page 8: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/8.jpg)
Prior to TFS
![Page 9: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/9.jpg)
“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
![Page 10: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/10.jpg)
Visual Studio 2005 Team System
Visual Studio 2008 Team System
Visual Studio Team Foundation Server 2010
TFVC
![Page 11: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/11.jpg)
Centralized Version Control Systembased on (server) workspaces
![Page 12: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/12.jpg)
Add
Pending Change
Check-inHistory
Changeset
Check-out
Check-out lock
Compare
Label
Rollback
Cloak
Shelving
![Page 13: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/13.jpg)
Disadvantages
Offline scenario’s
Read-only files
You need Visual Studio (or TEE or the Power Tools for Shell integration)
12
3
![Page 14: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/14.jpg)
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
![Page 15: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/15.jpg)
Visual Studio Team Foundation Server 2012
TFVCLocal Workspaces
V2
![Page 16: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/16.jpg)
Centralized Version Control Systembased on (local) workspaces
$TF
![Page 17: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/17.jpg)
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
![Page 18: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/18.jpg)
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
![Page 19: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/19.jpg)
if (number of files > 100,000 ) || (locking = required)) { return “consider server workspace”;}else {
return “consider local workspace”;}
If you really want TFVC
![Page 20: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/20.jpg)
Server vs Local Workspaces
![Page 21: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/21.jpg)
![Page 22: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/22.jpg)
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
![Page 23: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/23.jpg)
![Page 24: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/24.jpg)
There were 2 players
Git
![Page 25: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/25.jpg)
![Page 26: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/26.jpg)
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
![Page 27: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/27.jpg)
![Page 28: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/28.jpg)
There were some principles
100% true Git join the community
![Page 29: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/29.jpg)
![Page 30: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/30.jpg)
![Page 31: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/31.jpg)
Team Foundation Server 2013 & Visualstudio.com
Git100%
Visual Studio 2012 (+Tools for Git) & Visual Studio 2013
![Page 32: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/32.jpg)
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
![Page 33: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/33.jpg)
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
![Page 34: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/34.jpg)
Team Foundation Server 2013 & Visualstudio.com
![Page 35: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/35.jpg)
Web interface
![Page 36: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/36.jpg)
Migration & Web Interface
![Page 37: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/37.jpg)
for dummies
![Page 38: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/38.jpg)
initclonecommit
fetchpullpush
![Page 39: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/39.jpg)
Git TFVCcommit /
push check-in
fetch get-latest
pullget-latest +
merge
![Page 40: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/40.jpg)
Super Simple Git Workflowfor the lone wolf
init/clone
add
commit
push
Staged
To a remote
![Page 41: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/41.jpg)
Super Simple TeamWorkflowfor the hyper agile team
init/clone
add/commit
pull
push
![Page 42: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/42.jpg)
Feature BranchesShort lived, Isolated Sandboxes
init/clone
branch checkout
add/commit
checkout
merge
push
![Page 43: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/43.jpg)
![Page 44: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/44.jpg)
Clone the code
![Page 45: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/45.jpg)
Push the modifications
![Page 46: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/46.jpg)
Everything is synchronized
![Page 47: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/47.jpg)
Branches
![Page 48: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/48.jpg)
Using Git with Visual Studio
![Page 49: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/49.jpg)
TFS Build, Deployment & Cross-platform
![Page 50: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/50.jpg)
TFS Build
![Page 51: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/51.jpg)
Deployment protocol
![Page 52: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/52.jpg)
Cross-platform
TEE EGit
![Page 53: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/53.jpg)
TFS Build + Cross-platform
![Page 54: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/54.jpg)
![Page 55: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/55.jpg)
Enterprise class support
Ease of installationSupport and servicingEase of managementIntegrated AuthenticationEnhanced permissionsALM Integration
![Page 56: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/56.jpg)
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
![Page 57: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/57.jpg)
Team Foundation Version Control
Git(hosted by TFS)
![Page 58: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/58.jpg)
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
![Page 59: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/59.jpg)
Remember
Source Control is only a part of an ALM
solution!
![Page 60: Taking your version control to a next level with TFS and Git](https://reader037.vdocuments.us/reader037/viewer/2022110114/546e03fdaf79590b198b514d/html5/thumbnails/60.jpg)
Thanks!Vanwynsbergheawww.alexandervanwynsberghe.be