SlideShare a Scribd company logo
1 of 33
Roslyn on GitHub
Who let JaredPar pick the infrastructure?
Overview
 Git
 The basics
 Typical workflow
 Tools
 How we work
 Code structure
 Transition
 Looking forward
Learning Git
SHAwhat?
What is this talk?
 This is not a definitive guide to Git
 Too big a topic for a 1 hour talk
 This is a broad overview of Git
 Explain the work flow
 Introduce the basic commands
 Explain the Git mindset
 Git is different than TFS or SD
 The mindset is the key to learning Git
Remember learning TFS?
 Everyone was given a handy command map
sd sync -> tf get . /r
sd commit -> tf checkin
sd branch -> tf branch
sd undo -> tf revert
 Don’t learn Git this way
 There is no simple command mapping
Git is different
 TFS is a black box
 It is backed by a SQL server
 It has a ASP.Net front end
 Developers unconcerned with how data is stored
 Git is a very thin layer over the file system
 Implementation bleeds into the presentation
 Commands directly modify the local file system
 Must know how Git works to use it efficiently
Storing Content
 Core of Git is a content addressable file system
 Key / Value storage
 Value can be …
 Contents of a file or directory
 Description of a change
 Key is the checksum of the value (SHA1)
 Value is immutable
 If the value changes, so does the key
 Everything is stored here (commits, files, directories, etc ...)
 This mapping is central to the operation of git
Git used to checksums
 “Do one thing well” Unix Philosophy
 Git does one thing well … checksums
 Check sums are used to
 Lookup file, directory contents
 Sync across machines
 Basically everything
 SHA-1 hash is 40 characters
 Typically referenced by first 6 characters
 More used only in face of collisions
Demo Git Basics
It’s CMD time
Basic Commands
 status:
 Displays tracked files that have changed
 Displays untracked (new) files
 add:
 Include file in the set of files to be added
 Adds file to the object store
 commit:
 Equivalent of checking files in
Commits
 Just another piece of addressable content
 Contents
 Reference to parent commit objects (0-N)
 Reference to a tree object
 Set of file names + contents SHA1
 Commit Message
 Author name
 Description of a change
Branches
 Content
 Reference (SHA-1) to a commit object
 Every commit updates the reference
 That’s it
 Extremely light weight
 One file one disk
 Content is SHA1 of the current commit
 20 bytes per branch
What is in the Git Repo?
 Content addressable storage
 List of named branches
 Each has a SHA1 referring to the latest commit
 List of remote repos
 URL of the Git repo
 Set of branches in the repo
History
 Repos have a set of branches
 Local and remote
 Complete history is available for every branch
 Branch points to a commit
 Every commit points to its parent (recursive)
 Every commit points to its contents
 This is distributed version control
 My repo is as complete as any other
Working with remotes
 Typical naming
 upstream: dotnet/roslyn
 origin: jaredpar/roslyn
 fetch brings down changes from a remote repo
 Updates list of branches and their commits
 This in turn brings down all the changes for the new commits
 fetch is always safe
 Never changes the working directory
 Manually merge changes later
 pull = fetch + merge
Pull requests
 All work occurs in personal fork
 Developers never commit directly to dotnet/roslyn
 Iterate in personal fork until ready for official repo
 Create a Pull Request (PR)
 Please merge my branch into official repo
 All changes to your branch reflected immediately in PR
 Developers offer feedback on the PR
 Eventually change is accepted and auto-merged into official repo
Demo Git Workflow
The Tools
A UI for Git?
GitHub For Windows
 Free application created by GitHub
 https://windows.github.com/
 Sets up local 2 factor authentication
 Use UI or command line without dealing with tokens
 Installs standard versions of git on the machine
 A mysysgit installation optimized for Windows
 Includes posh-git
 Automatically, and frequently, updates itself
FxKit
 xcopy toolkit developed by CoreFx (Nicholg)
 Git environment optimized for DevDiv usage
 This is not razzle
 No admin requirements, no private toolset
 Extending git in supported ways
 Gaining traction in corefx
 Not intended to be a requirement, just a tool
Other
 More fully featured
 TortoiseGit: https://code.google.com/p/tortoisegit/
 Bare bones installations
 MySysGit: https://msysgit.github.io/
 Cygwin: https://www.cygwin.com/
Code Structure
What goes where?
Code flow today
TFS
Open
src
build
Loc
Closed
GitHub
src
build
One way pump
Code flow after the switch
TFS
Open
Loc
Closed
GitHub
src
build
One way mirror
src
build
Where do I work?
 Majority of work is in GitHub
 Holds all production code
 Holds most of our tooling
 All work done in personal forks of dotnet/Roslyn
 Start with one branch per change
 Code merged into main repot via Pull Requests
Getting a full enlistment
 Use SyncGit.ps1
 New file in root of TFS repo
 Will setup a Git repo inside Open
 Direct clone of your fork into Open
 The TFS Open directory will be cloaked
 Results in same directory layout present today
 Can commit to git or TFS from this setup
Cross cutting changes
 Changes that affect both Open and Closed
 Use a full enlistment
 Must be done in Git and TFS
 First get code committed to GitHub
 Then get the code committed to TFS
 Such changes should be rare
 If common then probably need to move more to Open
How does code get shipped?
 Changes from Git mirrored to TFS
 Official builds still come from MicroBuild
 MicroBuild process will use TFS
 Gets GitHub changes from mirror
 Directory structure unchanged from today
 Nothing changes about MicroBuild
Components not in public repot
 All major components will be in GitHub by 2/7
 Smaller items will migrate directly to GitHub after
 Feel empowered to move items still in Closed
 Only a small number of items can’t be moved
 Just check with JaredPar before moving
Looking forward
 Git / TFS mix will exist for a few weeks
 Give developers time to adjust
 Figure out our processes
 Let the Open / Closed breakdown settle
 Eventually Closed moves to private GitHub repo
 Possible move to binary refs between the two
 TFS still exists but just for MicroBuild and PDB sources
Please have patience
 This is a big change
 Working to make it as smooth as possible
 That doesn’t make it any smaller
 There will be
 Hiccups
 Unanticipated obstacles
 A transition period
 Team effort to get us through this
Resources
 Pro Git Book (online): http://git-scm.com/book/en/v2
 Git SCM Blog: http://git-scm.com/blog
 Git Immersion: http://gitimmersion.com/
 Just google “git {my problem}”
 More resources than time to read them

More Related Content

What's hot

Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and GithubHouari ZEGAI
 
News from Git in Eclipse - EclipseCon EU - 2016-10-26
News from Git in Eclipse - EclipseCon EU - 2016-10-26News from Git in Eclipse - EclipseCon EU - 2016-10-26
News from Git in Eclipse - EclipseCon EU - 2016-10-26msohn
 
Git basics to advance with diagrams
Git basics to advance with diagramsGit basics to advance with diagrams
Git basics to advance with diagramsDilum Navanjana
 
Introduction to Git and GitHub Part 2
Introduction to Git and GitHub Part 2Introduction to Git and GitHub Part 2
Introduction to Git and GitHub Part 2Omar Fathy
 
Git strategies for DevOps
Git strategies for DevOpsGit strategies for DevOps
Git strategies for DevOpsAhmad Iqbal Ali
 
Advanced Git: Functionality and Features
Advanced Git: Functionality and FeaturesAdvanced Git: Functionality and Features
Advanced Git: Functionality and FeaturesBrent Laster
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hubVenkat Malladi
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewRueful Robin
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and GithubWycliff1
 
Jenkins2 - Coding Continuous Delivery Pipelines
Jenkins2 - Coding Continuous Delivery PipelinesJenkins2 - Coding Continuous Delivery Pipelines
Jenkins2 - Coding Continuous Delivery PipelinesBrent Laster
 
Introduction to GitHub
Introduction to GitHubIntroduction to GitHub
Introduction to GitHubNishan Bose
 
Getting Started with GitHub
Getting Started with GitHubGetting Started with GitHub
Getting Started with GitHubMichael Redlich
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and githubAderemi Dadepo
 

What's hot (20)

Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
A prentation on github
A prentation on githubA prentation on github
A prentation on github
 
News from Git in Eclipse - EclipseCon EU - 2016-10-26
News from Git in Eclipse - EclipseCon EU - 2016-10-26News from Git in Eclipse - EclipseCon EU - 2016-10-26
News from Git in Eclipse - EclipseCon EU - 2016-10-26
 
Git basics to advance with diagrams
Git basics to advance with diagramsGit basics to advance with diagrams
Git basics to advance with diagrams
 
Introduction to Git and GitHub Part 2
Introduction to Git and GitHub Part 2Introduction to Git and GitHub Part 2
Introduction to Git and GitHub Part 2
 
Git strategies for DevOps
Git strategies for DevOpsGit strategies for DevOps
Git strategies for DevOps
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Advanced Git: Functionality and Features
Advanced Git: Functionality and FeaturesAdvanced Git: Functionality and Features
Advanced Git: Functionality and Features
 
Git best practices 2016
Git best practices 2016Git best practices 2016
Git best practices 2016
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
 
Intro to Git & GitHub
Intro to Git & GitHubIntro to Git & GitHub
Intro to Git & GitHub
 
Git Series - Part 1
Git Series - Part 1 Git Series - Part 1
Git Series - Part 1
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
 
Git n git hub
Git n git hubGit n git hub
Git n git hub
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
 
Jenkins2 - Coding Continuous Delivery Pipelines
Jenkins2 - Coding Continuous Delivery PipelinesJenkins2 - Coding Continuous Delivery Pipelines
Jenkins2 - Coding Continuous Delivery Pipelines
 
Git
GitGit
Git
 
Introduction to GitHub
Introduction to GitHubIntroduction to GitHub
Introduction to GitHub
 
Getting Started with GitHub
Getting Started with GitHubGetting Started with GitHub
Getting Started with GitHub
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and github
 

Similar to Roslyn on GitHub (20)

Git workshop 33degree 2011 krakow
Git workshop 33degree 2011 krakowGit workshop 33degree 2011 krakow
Git workshop 33degree 2011 krakow
 
Getting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS UsersGetting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS Users
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
Git basics
Git basicsGit basics
Git basics
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 
Version control with GIT
Version control with GITVersion control with GIT
Version control with GIT
 
Git introduction
Git introductionGit introduction
Git introduction
 
Introduction to git & GitHub
Introduction to git & GitHubIntroduction to git & GitHub
Introduction to git & GitHub
 
Git Tutorial
Git Tutorial Git Tutorial
Git Tutorial
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
 
Git_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_GuidewireGit_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_Guidewire
 
Git_new.pptx
Git_new.pptxGit_new.pptx
Git_new.pptx
 
Git made-it easy
Git made-it easyGit made-it easy
Git made-it easy
 
Git Mastery
Git MasteryGit Mastery
Git Mastery
 
Git usage (Basics and workflow)
Git usage (Basics and workflow)Git usage (Basics and workflow)
Git usage (Basics and workflow)
 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 
August OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub ExplainedAugust OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub Explained
 
Git hub_pptx
Git hub_pptxGit hub_pptx
Git hub_pptx
 
Git workshop
Git workshopGit workshop
Git workshop
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 

Recently uploaded

Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 

Recently uploaded (20)

Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 

Roslyn on GitHub

  • 1. Roslyn on GitHub Who let JaredPar pick the infrastructure?
  • 2. Overview  Git  The basics  Typical workflow  Tools  How we work  Code structure  Transition  Looking forward
  • 4. What is this talk?  This is not a definitive guide to Git  Too big a topic for a 1 hour talk  This is a broad overview of Git  Explain the work flow  Introduce the basic commands  Explain the Git mindset  Git is different than TFS or SD  The mindset is the key to learning Git
  • 5. Remember learning TFS?  Everyone was given a handy command map sd sync -> tf get . /r sd commit -> tf checkin sd branch -> tf branch sd undo -> tf revert  Don’t learn Git this way  There is no simple command mapping
  • 6. Git is different  TFS is a black box  It is backed by a SQL server  It has a ASP.Net front end  Developers unconcerned with how data is stored  Git is a very thin layer over the file system  Implementation bleeds into the presentation  Commands directly modify the local file system  Must know how Git works to use it efficiently
  • 7. Storing Content  Core of Git is a content addressable file system  Key / Value storage  Value can be …  Contents of a file or directory  Description of a change  Key is the checksum of the value (SHA1)  Value is immutable  If the value changes, so does the key  Everything is stored here (commits, files, directories, etc ...)  This mapping is central to the operation of git
  • 8. Git used to checksums  “Do one thing well” Unix Philosophy  Git does one thing well … checksums  Check sums are used to  Lookup file, directory contents  Sync across machines  Basically everything  SHA-1 hash is 40 characters  Typically referenced by first 6 characters  More used only in face of collisions
  • 10. Basic Commands  status:  Displays tracked files that have changed  Displays untracked (new) files  add:  Include file in the set of files to be added  Adds file to the object store  commit:  Equivalent of checking files in
  • 11. Commits  Just another piece of addressable content  Contents  Reference to parent commit objects (0-N)  Reference to a tree object  Set of file names + contents SHA1  Commit Message  Author name  Description of a change
  • 12. Branches  Content  Reference (SHA-1) to a commit object  Every commit updates the reference  That’s it  Extremely light weight  One file one disk  Content is SHA1 of the current commit  20 bytes per branch
  • 13. What is in the Git Repo?  Content addressable storage  List of named branches  Each has a SHA1 referring to the latest commit  List of remote repos  URL of the Git repo  Set of branches in the repo
  • 14. History  Repos have a set of branches  Local and remote  Complete history is available for every branch  Branch points to a commit  Every commit points to its parent (recursive)  Every commit points to its contents  This is distributed version control  My repo is as complete as any other
  • 15. Working with remotes  Typical naming  upstream: dotnet/roslyn  origin: jaredpar/roslyn  fetch brings down changes from a remote repo  Updates list of branches and their commits  This in turn brings down all the changes for the new commits  fetch is always safe  Never changes the working directory  Manually merge changes later  pull = fetch + merge
  • 16. Pull requests  All work occurs in personal fork  Developers never commit directly to dotnet/roslyn  Iterate in personal fork until ready for official repo  Create a Pull Request (PR)  Please merge my branch into official repo  All changes to your branch reflected immediately in PR  Developers offer feedback on the PR  Eventually change is accepted and auto-merged into official repo
  • 18. The Tools A UI for Git?
  • 19. GitHub For Windows  Free application created by GitHub  https://windows.github.com/  Sets up local 2 factor authentication  Use UI or command line without dealing with tokens  Installs standard versions of git on the machine  A mysysgit installation optimized for Windows  Includes posh-git  Automatically, and frequently, updates itself
  • 20. FxKit  xcopy toolkit developed by CoreFx (Nicholg)  Git environment optimized for DevDiv usage  This is not razzle  No admin requirements, no private toolset  Extending git in supported ways  Gaining traction in corefx  Not intended to be a requirement, just a tool
  • 21. Other  More fully featured  TortoiseGit: https://code.google.com/p/tortoisegit/  Bare bones installations  MySysGit: https://msysgit.github.io/  Cygwin: https://www.cygwin.com/
  • 24. Code flow after the switch TFS Open Loc Closed GitHub src build One way mirror src build
  • 25. Where do I work?  Majority of work is in GitHub  Holds all production code  Holds most of our tooling  All work done in personal forks of dotnet/Roslyn  Start with one branch per change  Code merged into main repot via Pull Requests
  • 26. Getting a full enlistment  Use SyncGit.ps1  New file in root of TFS repo  Will setup a Git repo inside Open  Direct clone of your fork into Open  The TFS Open directory will be cloaked  Results in same directory layout present today  Can commit to git or TFS from this setup
  • 27. Cross cutting changes  Changes that affect both Open and Closed  Use a full enlistment  Must be done in Git and TFS  First get code committed to GitHub  Then get the code committed to TFS  Such changes should be rare  If common then probably need to move more to Open
  • 28. How does code get shipped?  Changes from Git mirrored to TFS  Official builds still come from MicroBuild  MicroBuild process will use TFS  Gets GitHub changes from mirror  Directory structure unchanged from today  Nothing changes about MicroBuild
  • 29. Components not in public repot  All major components will be in GitHub by 2/7  Smaller items will migrate directly to GitHub after  Feel empowered to move items still in Closed  Only a small number of items can’t be moved  Just check with JaredPar before moving
  • 30. Looking forward  Git / TFS mix will exist for a few weeks  Give developers time to adjust  Figure out our processes  Let the Open / Closed breakdown settle  Eventually Closed moves to private GitHub repo  Possible move to binary refs between the two  TFS still exists but just for MicroBuild and PDB sources
  • 31.
  • 32. Please have patience  This is a big change  Working to make it as smooth as possible  That doesn’t make it any smaller  There will be  Hiccups  Unanticipated obstacles  A transition period  Team effort to get us through this
  • 33. Resources  Pro Git Book (online): http://git-scm.com/book/en/v2  Git SCM Blog: http://git-scm.com/blog  Git Immersion: http://gitimmersion.com/  Just google “git {my problem}”  More resources than time to read them

Editor's Notes

  1. Emphasize this is an overview, not a definitive guide
  2. Ask, does anyone here actually know how data is stored in TFS? Emphasize that every command is just making a small tweak to the file system
  3. Note that the value is immutable simply by virtue of the address system. If the value changes then so does it’s key
  4. Such a pun  Git hash-object 7c31c8840d83b5d7bc8b7479331a6332df60656b I suppose it is tempting, if the only tool you have is a hammer, to treat everything as if it were a nail.
  5. Cover cat-file hash-object commit
  6. Mention these branches are equivalent to local branches. It is just a name that points to a commit object.
  7. Git hash-object 7c31c8840d83b5d7bc8b7479331a6332df60656b I suppose it is tempting, if the only tool you have is a hammer, to treat everything as if it were a nail.
  8. If you come to me with 2 factor authentication problems I will tell you to install GitHub for windows
  9. Not a requirement by any means.
  10. Any cross cutting change that is regularly occurring is a sign that the code isn’t factored correctly
  11. Yes this causes the pot
  12. Need to find a way to manually kick it off
  13. Some things we simply can’t be fixed until we take the plunge