SlideShare a Scribd company logo
1 of 25
Introduction to Git
Uri Goldstein
What is Git?
• A Version Control System like SVN - ONLY
BETTER.
• Everything is faster and easier:
– Committing.
– Reverting.
– Branching.
– Merging.
• Work disconnected = Offline.
What is GitHub?
• A web-based git hosting service.
• Like Assembla, only better. 
• Uses a simple workflow = GitHub Flow.
• Extremely popular.
• A community of devs sharing
code.
But…
• Git is a Swiss Army Knife.
• Once you master it,
it’ll make your life easier.
LIFECYCLE OF A CHANGE
Subversion
SVN Server
TCMW
Repository
Uri’s Machine
TCMW
Local Copy
Lior’s Machine
TCMW
Local Copy
Git – Everyone Gets a Repo
Git Server
TCMW
Repository
Uri’s Machine
TCMW
Working
Copy
Lior’s Machine
TCMW
Working
Copy
TCMW
Repository
TCMW
Repository
“Origin”
GitHubUri’s Machine
Lifecycle of a Change
Staging
Area
Local Git
Repository
Remote Git
Repository
Commit PushC:dev
MyClass.cs
Stage
Demo
Lifecycle of a Change – Cont’d
GitHubLior’s Machine
C:dev
MyClass.cs
Local Git
Repository
Remote Git
Repository
Merge Pull
BRANCHES
Subversion
• Creating branches takes time.
• Commits are big.
• SVN stores diffs in repo.

• Merging is a pain
Subversion
Trunk
Uri makes
changes
on his machine
Lior makes
changes
on his machine
Conflict
Git
• Creating branches is a snap.
• Commits are small and frequent.
• Git stores full files in repo.

• Merging is a joy much less painful.
Master
Lior’sFeature
Git
Uri’sFeature
Branch
Pull
Push
Branch
Pull
Push
Pull
Pull
Master
Branch
Push
Lior’sFeature
Git
Uri’sFeature
Uri’sBugFix
Branch
Pull
Push
Branch
Pull
Push
Pull
Pull
Demo
GITHUB AND GITHUB FLOW
GitHub
• Huge online community for open-source
projects = Public.
• Huge online service for commercial start-ups
and enterprises = PRIVATE.
• Runs Git Flow.
GitHub Flow
GitHub Flow
• ‘master’ branch is always stable.
• Devs use ‘feature’* branches.
• Feature branches pull from master freely.
• Feature branches merge back to master via
Pull Request = PR.
• Pull Request reviewed by peer + auto tests.
 ‘master’ branch is always stable.
A day in the life 1/2
• Brew a hot cup of coffee.
• Pull latest from origin master.
• Need to work on new feature 
• Branch = create new feature branch.
• Code and commit in small increments.
• Lunch! 
A day in the life 2/2
• Brew a hot cup of coffee.
• Pull latest from origin master.
• Resolve tiny conflicts easily.
• Verify quality with unit/integ. tests.
• Submit Pull Request (PR) for review.
• Nag reviewers to review.
• PR accepted? Verify master green on build server
• Celebrate the day with a drink. 
Demo
Thank you.
• http://tinyurl.com/gitandgithub
• Git Documentation
http://www.git-scm.com/
• Pro Git – Free book
http://www.git-scm.com/book/en/v2
• GitHub
http://github.com/
• SourceTree – Git Client
https://www.sourcetreeapp.com/
• Use Visual Studio with Git
https://msdn.microsoft.com/en-us/library/hh850437.aspx

More Related Content

What's hot

Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Simplilearn
 

What's hot (20)

Git, GitHub and Open Source
Git, GitHub and Open SourceGit, GitHub and Open Source
Git, GitHub and Open Source
 
Git tutorial
Git tutorial Git tutorial
Git tutorial
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Inside GitHub
Inside GitHubInside GitHub
Inside GitHub
 
Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1
 
Git and Github Session
Git and Github SessionGit and Github Session
Git and Github Session
 
Intro to Git, GitHub, and Devpost
Intro to Git, GitHub, and DevpostIntro to Git, GitHub, and Devpost
Intro to Git, GitHub, and Devpost
 
Learning git
Learning gitLearning git
Learning git
 
Introduction to github slideshare
Introduction to github slideshareIntroduction to github slideshare
Introduction to github slideshare
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Github
GithubGithub
Github
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
 
Git101
Git101Git101
Git101
 
Git basic
Git basicGit basic
Git basic
 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With Git
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
 
Github Case Study By Amil Ali
Github Case Study By Amil AliGithub Case Study By Amil Ali
Github Case Study By Amil Ali
 
Git tutorial II
Git tutorial IIGit tutorial II
Git tutorial II
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
 

Similar to Intro to Git and GitHub

Beginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitBeginner's Guide to Version Control with Git
Beginner's Guide to Version Control with Git
Robert Lee-Cann
 
[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't Code[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't Code
Christopher Schmitt
 
Migrating to git
Migrating to gitMigrating to git
Migrating to git
Xpand IT
 
Git with bitbucket
Git with bitbucketGit with bitbucket
Git with bitbucket
Sumin Byeon
 
3 Git
3 Git3 Git

Similar to Intro to Git and GitHub (20)

Collaborative development with git
Collaborative development with gitCollaborative development with git
Collaborative development with git
 
Beginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitBeginner's Guide to Version Control with Git
Beginner's Guide to Version Control with Git
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHub
 
Git Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial I
 
Working with Git
Working with GitWorking with Git
Working with Git
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
git Technologies
git Technologiesgit Technologies
git Technologies
 
[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't Code[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't Code
 
Git workshop - University of Moratuwa, Department of Computer Science and Eng...
Git workshop - University of Moratuwa, Department of Computer Science and Eng...Git workshop - University of Moratuwa, Department of Computer Science and Eng...
Git workshop - University of Moratuwa, Department of Computer Science and Eng...
 
Let's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubLet's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHub
 
Migrating to git
Migrating to gitMigrating to git
Migrating to git
 
Git tips and tricks
Git   tips and tricksGit   tips and tricks
Git tips and tricks
 
git-presentation.pdf
git-presentation.pdfgit-presentation.pdf
git-presentation.pdf
 
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
 
Steamlining your puppet development workflow
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflow
 
Git with bitbucket
Git with bitbucketGit with bitbucket
Git with bitbucket
 
Learn Git - For Beginners and Intermediate levels
Learn Git - For Beginners and Intermediate levelsLearn Git - For Beginners and Intermediate levels
Learn Git - For Beginners and Intermediate levels
 
Git for folk who like GUIs
Git for folk who like GUIsGit for folk who like GUIs
Git for folk who like GUIs
 
Elevate Your Builds: Next-Gen CI/CD with Azure Container Apps and KEDA
Elevate Your Builds: Next-Gen CI/CD with Azure Container Apps and KEDAElevate Your Builds: Next-Gen CI/CD with Azure Container Apps and KEDA
Elevate Your Builds: Next-Gen CI/CD with Azure Container Apps and KEDA
 
3 Git
3 Git3 Git
3 Git
 

Recently uploaded

%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Recently uploaded (20)

Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 

Intro to Git and GitHub

Editor's Notes

  1. Setup? Clone Change on disk Add to staging Commit to local Push to remote
  2. Pull from remote Branch Feature Make changes Commit   Branch Bug Commit and push Checkout Feature Pull Push
  3. Pull from remote Branch Feature Make changes Commit   Branch Bug Commit and push Checkout Feature Pull Push