Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Taking your version control to a next level with TFS and Git

15,704 views

Published on

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.

Published in: Technology
  • Be the first to comment

Taking your version control to a next level with TFS and Git

  1. 1. Who Am I? Alexander Vanwynsberghe Houthulst Working @ Cronos ALM (MVP) and ESN @Vanwynsberghea www.alexandervanwynsberghe.be
  2. 2. Source Control
  3. 3. Agenda Source control in general Git with Visual Studio Git on TFS or VisualStudio.com Git with TFS Build Git as deployment protocol Git on TFS in Cross-platform environments
  4. 4. Source Control Models Centralized Distributed
  5. 5. Back in the old days
  6. 6. Prior to TFS
  7. 7. “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
  8. 8. Visual Studio 2005 Team System Visual Studio 2008 Team System Visual Studio Team Foundation Server 2010 TFVC
  9. 9. Centralized Version Control System based on (server) workspaces
  10. 10. Rollback Cloak Check-out Add Shelving Changeset Label Check-out lock History Pending Change Check-in Compare
  11. 11. Disadvantages 1 Offline scenario’s 2 Read-only files 3 You need Visual Studio (or TEE or the Power Tools for Shell integration)
  12. 12. 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
  13. 13. Visual Studio Team Foundation Server 2012 TFVC V2 Local Workspaces
  14. 14. Centralized Version Control System based on (local) workspaces $TF
  15. 15. Local Workspaces • Default for TFS 2012 • No explicit checkout = easy to edit outside of Visual Studio or Eclipse • Get Latest & Check in Compares local cache against the server • Problematic for large codebases
  16. 16. Conclusion Strengths Best for • Scales to very large codebases • Large integrated codebases • Fine level permission control • • Control and auditability over source code down to the file level Allows usage monitoring • Offline editing support • Medium-sized integrated codebases • Easy to edit files outside Visual Studio or Eclipse • A balance of fine-grained control with reduced friction
  17. 17. If you really want TFVC if (number of files > 100,000 ) || (locking = required)) { return “consider server workspace”; } else { return “consider local workspace”; }
  18. 18. Server vs Local Workspaces
  19. 19. Modern Apps and OSS workflows  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
  20. 20. There were 2 players Git
  21. 21. Git took off  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
  22. 22. There were some principles 100% true Git join the community
  23. 23. Team Foundation Server 2013 & Visualstudio.com Git 100% Visual Studio 2012 (+Tools for Git) & Visual Studio 2013
  24. 24. Git Strengths Best for • Full offline experience • Modular codebases • Complete repository with portable history • Integrating with open source • Highly distributed teams • Simplified branching model
  25. 25. Team Foundation Server / VisualStudio online Project 1 3rd Party Project 2 Local Repo 3rd Party Other Remote Git Repo
  26. 26. Migration & Web Interface
  27. 27. for dummies
  28. 28. Git TFVC commit / push check-in fetch get-latest pull get-latest + merge
  29. 29. init/clone add Super Simple Git Workflow for the lone wolf Staged commit To a remote push
  30. 30. init/clone add/commit pull push Super Simple Team Workflow for the hyper agile team
  31. 31. Feature Branches init/clone Short lived, Isolated Sandboxes branch checkout checkout add/commit merge push
  32. 32. Clone the code
  33. 33. Push the modifications
  34. 34. Everything is synchronized
  35. 35. Branches
  36. 36. Using Git with Visual Studio
  37. 37. TFS Build
  38. 38. Deployment protocol
  39. 39. Cross-platform TEE EGit
  40. 40. TFS Build + Cross-platform
  41. 41. Enterprise class support Ease of installation Support and servicing Ease of management Integrated Authentication Enhanced permissions ALM Integration
  42. 42. I want to.. In Visual Studio? Command prompt Get 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 No, but you can view them. You can use the command prompt to push, edit, and remove tags. Create or edit a note No You 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 Apply a tag to a commit
  43. 43. Team Foundation Version Control Git (hosted by TFS)
  44. 44. When to Pick TFVC Git • Developers familiar with Centralized version control • Developers want to use it • Highly coupled codebase • Tight audit/control requirements • Use of MyWork + Code Review • Using tools with built-in Git support • XCode / iOS Development
  45. 45. Remember Source Control is only a part of an ALM solution!

×