240 likes | 349 Views
Sofia Event Center 14-15 May 2014. Git For TFS Developers. Martin Kulov. Centralized VCS. CVS Subversion Perforce Vault ClearCase Visual SourceSafe Team Foundation Version Control. Distributed VCS. Mercurial BitKeeper Fossil Bazaar Git. Centralized vs Distributed VCS.
E N D
Sofia Event Center 14-15 May 2014 Git For TFS Developers Martin Kulov
Centralized VCS • CVS • Subversion • Perforce • Vault • ClearCase • Visual SourceSafe • Team Foundation Version Control
Distributed VCS • Mercurial • BitKeeper • Fossil • Bazaar • Git
Centralized vs Distributed VCS • “master” vs “blessed” copy • “online” vs “offline” history • “expensive” vs “cheap” branching • diffs vs snapshots
Git in TFS and VSO • Supports every Git client • OSS implementation, not Microsoft one • Available in Visual Studio Online • Also in Team Foundation Server 2013 • Enterprise features
Enterprise Git • Easy installation and management • Support • High availability and scale • Integration authentication • Enhanced permissions • ALM integration • Localization
Git in Visual Studio • Create, clone repo • Push, pull, sync • Branching • Work Item linking • Simplified history
Installing Git • http://msysgit.github.io/
The “perfect” Git environment • Chocolatey • cinstPoshGit • cinst Git-Credential-Winstore • Enable TFS alternate credentials
Configuring Git • gitconfig --global user.name "Your Name" • gitconfig --global user.email "Your Email“ • .gitignore
Git commands (1) • init(“disconnected”) • clone (“connected”) • add, commit (“local”) • push, pull, fetch (“remote”) • status • log • gitk --all
Git basics • Full history is downloaded • History contains commits • Each commit is a snapshot, not a diff • Checksums are calculated • Operations are local • Three states • Working folder • Index (staged)
Git states • tracked • modified • staged
Anatomy of a commit • Author • Committer • Date • Message • Parent commit(s) f46b2 time 27d72 92da1 a72c2
Branches master * • Pointer to a commit • Stay local unless explicit push • Easy to create and delete • Remotes are read-only • HEAD is another pointer f46b2 feature1 time 27d72 92da1 a72c2 origin
Git commands (2) • remote • branch, checkout, merge • rebase
Changing history • git rebase • Change commit’s parent
Centralized Workflow • One central repo • Dev team push and pull from it • gitpull --rebase origin master
Links • git-scm.com/book • www.atlassian.com/git/ • Microsoft Virtual Academy – Using Git with Visual Studio 2013
Questions??? Share your feedback for this particular session and for the overall conference experience at http://aka.ms/intouch for a chance to win our prizes!