SlideShare a Scribd company logo
1 of 35
Download to read offline
Introduction to
Sameeh Jubran, Sameeh@daynix.com
Why git is useful?
Use cases
Use cases
Use cases
Consider this scenario:
● You have a homework submission in Matam for today
and the assignment is ready for submission
● While testing it you discovered a minor bug and decided
to fix it
Use cases
● After attempting to do so, you accidentally changed a
working code and got yourself in a big mess
● You no longer remember what was and what wasn’t
there
● It is 23:58 PM
Now you realize that CTRL + Z won’t solve your
problems
What is git?
What is git?
● Open source project originally developed in 2005 by
Linus Torvalds
● A command line utility
● You can imagine git as something that sits on top of
your file system and manipulates files.
● A distributed version control system - DCVS
What is “distributed version
control system” ?
● Version control system is a system that records
changes to a file or set of files over time so that you can
recall specific versions later
● Distributed means that there is no main server and all
of the full history of the project is available once you
cloned the project.
A brief history
● In 2002, the Linux kernel project began using a DVCS
called BitKeeper
● In 2005, the commercial company that developed
BitKeeper broke down, and the tool’s free-of-charge
status was revoked
● This prompted the Linux development community (and
in particular Linus Torvalds, the creator of Linux) to
develop their own tool - git
Demo
● You can imagine git as something that sits on top of
your file system and manipulates files.
● This “something” is a tree structure where each commit
creates a new node in that tree.
● Nearly all git commands actually
serve to navigate on this tree and
to manipulate it accordingly.
git
branch
commit
git repository
git repository
● The purpose of git is to manage a project, or a set of
files, as they change over time. Git stores this
information in a data structure called a repository
● A git repository contains, mainly:
○ A set of commits
Commit
● A commit object mainly contains three things:
○ A set of changes the commit introduces
○ Commit message describing the changes
○ A hash, a 40-character string that uniquely identifies
the commit object
Commit
Commit id (hash)
Commit message
The change the commit introduces
Github
Github
● GitHub is a web-based Git repository hosting service
git workflow
How commits are created?
Introduce changes
Add the change to
staging area
Make that change
“permanent”
git add
git commit
The three steps of git
● Introduce a change: introduce a change to a file that is
being tracked by git
● Add the actual change to staging area: Add the
change you actually want using “git add”
● Commit: Commit the change that has been added using
git commit
Add the change to
staging area
Make that change
“permanent”
git add
git commit
Introduce changes
Let’s create a commit
git commands
git commands
● For most of the basic interactions with git you’ll mainly
use 7 commands that we’ll cover here
git commands
● git init
● git clone
● git log
● git diff
● git status
● git add
● git commit
git init
● Creates a new git repository
● Can be used to convert an existing, unversioned project
to a git repository or initialize a new empty repository
git clone
● Copies an existing git repository
git log
Shows the commit logs
git add
● Adds changes
Introduce a change
Add the change to
staging area
Make that change
“permanent”
git add
git commit
git commit
● Creates a commit out of the changes that had been
added
Introduce a change
Add the change to
staging area
Make that change
“permanent”
git add
git commit
git diff
● Displays the change that was introduced
Useful flag:
● --cached:
Displays the change that was added using “git add”
git status
● Displays the file names that has been modified, added
and untracked
Bonus command:
git checkout
● Checking out a commit makes the entire working
directory match that commit
Q&A
Cheat Sheet

More Related Content

What's hot

Git and GitHub
Git and GitHubGit and GitHub
Git and GitHubJames Gray
 
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
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notesglen_a_smith
 
Introduction to Version Control
Introduction to Version ControlIntroduction to Version Control
Introduction to Version ControlJeremy Coates
 
Git Lab Introduction
Git Lab IntroductionGit Lab Introduction
Git Lab IntroductionKrunal Doshi
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners HubSpot
 
Introducing GitLab (June 2018)
Introducing GitLab (June 2018)Introducing GitLab (June 2018)
Introducing GitLab (June 2018)Noa Harel
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hubVenkat Malladi
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHubNicolás Tourné
 

What's hot (20)

Github basics
Github basicsGithub basics
Github basics
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
git and github
git and githubgit and github
git and github
 
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 ...
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
 
Git n git hub
Git n git hubGit n git hub
Git n git hub
 
Git basics
Git basicsGit basics
Git basics
 
Git training v10
Git training v10Git training v10
Git training v10
 
Introduction to Version Control
Introduction to Version ControlIntroduction to Version Control
Introduction to Version Control
 
Git and Github
Git and GithubGit and Github
Git and Github
 
Git Lab Introduction
Git Lab IntroductionGit Lab Introduction
Git Lab Introduction
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
 
BitBucket presentation
BitBucket presentationBitBucket presentation
BitBucket presentation
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
 
Introducing GitLab (June 2018)
Introducing GitLab (June 2018)Introducing GitLab (June 2018)
Introducing GitLab (June 2018)
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 

Viewers also liked

Git introduction workshop for scientists
Git introduction workshop for scientists Git introduction workshop for scientists
Git introduction workshop for scientists Steven Hamblin
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to GitColin Su
 
Holiday Ominchannel Infographic by Lightspeed POS
Holiday Ominchannel Infographic by Lightspeed POSHoliday Ominchannel Infographic by Lightspeed POS
Holiday Ominchannel Infographic by Lightspeed POSLourie Contaoe
 
DIRECCION MAC
DIRECCION MACDIRECCION MAC
DIRECCION MACJonatan54
 
Fiscalidad en internet
Fiscalidad en internetFiscalidad en internet
Fiscalidad en internetilda p bed
 
Open Technology Center - 2016 Operational Overview
Open Technology Center - 2016 Operational OverviewOpen Technology Center - 2016 Operational Overview
Open Technology Center - 2016 Operational OverviewJohn Weathersby
 
Tatuaje iii (resurreccion) ana alonso y javier pelegrin
Tatuaje iii (resurreccion)  ana alonso y javier pelegrinTatuaje iii (resurreccion)  ana alonso y javier pelegrin
Tatuaje iii (resurreccion) ana alonso y javier pelegrinlaaloo41
 
Northeast kl
Northeast klNortheast kl
Northeast klYue Yun
 
Phân tích tình hình tài chính tại công ty cổ phần my way hospitality
Phân tích tình hình tài chính tại công ty cổ phần my way hospitalityPhân tích tình hình tài chính tại công ty cổ phần my way hospitality
Phân tích tình hình tài chính tại công ty cổ phần my way hospitalityhttps://www.facebook.com/garmentspace
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to GitLukas Fittl
 

Viewers also liked (18)

Introduction To Git
Introduction To GitIntroduction To Git
Introduction To Git
 
Git introduction workshop for scientists
Git introduction workshop for scientists Git introduction workshop for scientists
Git introduction workshop for scientists
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Holiday Ominchannel Infographic by Lightspeed POS
Holiday Ominchannel Infographic by Lightspeed POSHoliday Ominchannel Infographic by Lightspeed POS
Holiday Ominchannel Infographic by Lightspeed POS
 
DIRECCION MAC
DIRECCION MACDIRECCION MAC
DIRECCION MAC
 
Fiscalidad en internet
Fiscalidad en internetFiscalidad en internet
Fiscalidad en internet
 
Reuse for you(ใหม่)
Reuse for you(ใหม่)Reuse for you(ใหม่)
Reuse for you(ใหม่)
 
Presentación2
Presentación2Presentación2
Presentación2
 
Open Technology Center - 2016 Operational Overview
Open Technology Center - 2016 Operational OverviewOpen Technology Center - 2016 Operational Overview
Open Technology Center - 2016 Operational Overview
 
Natalie C V 2016
Natalie C V 2016Natalie C V 2016
Natalie C V 2016
 
Tatuaje iii (resurreccion) ana alonso y javier pelegrin
Tatuaje iii (resurreccion)  ana alonso y javier pelegrinTatuaje iii (resurreccion)  ana alonso y javier pelegrin
Tatuaje iii (resurreccion) ana alonso y javier pelegrin
 
Kapita selekta sjns
Kapita selekta sjnsKapita selekta sjns
Kapita selekta sjns
 
Northeast kl
Northeast klNortheast kl
Northeast kl
 
Git Introduction
Git IntroductionGit Introduction
Git Introduction
 
Sin título 1
Sin título 1Sin título 1
Sin título 1
 
Phân tích tình hình tài chính tại công ty cổ phần my way hospitality
Phân tích tình hình tài chính tại công ty cổ phần my way hospitalityPhân tích tình hình tài chính tại công ty cổ phần my way hospitality
Phân tích tình hình tài chính tại công ty cổ phần my way hospitality
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 

Similar to Introduction to Git

Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hubNaveen Pandey
 
Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.WordCamp Harare
 
Git Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdfGit Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdfuzair
 
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, TrivandrumIntroduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, TrivandrumAbhijitNarayan2
 
Git: a tool for wizards
Git: a tool for wizardsGit: a tool for wizards
Git: a tool for wizardsresponseteam
 
Brief tutorial on Git
Brief tutorial on GitBrief tutorial on Git
Brief tutorial on Git聖文 鄭
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptxtnscharishma
 
An introductory guide to GIT
An introductory guide to GITAn introductory guide to GIT
An introductory guide to GITAmith jayasekara
 
Git and github fundamentals
Git and github fundamentalsGit and github fundamentals
Git and github fundamentalsRajKharvar
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticlePRIYATHAMDARISI
 
introduction in version control system
introduction in version control systemintroduction in version control system
introduction in version control systemBiga Gaber
 

Similar to Introduction to Git (20)

Formation git
Formation gitFormation git
Formation git
 
Git Basics
Git BasicsGit Basics
Git Basics
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
 
Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.
 
Git Init (Introduction to Git)
Git Init (Introduction to Git)Git Init (Introduction to Git)
Git Init (Introduction to Git)
 
Git
GitGit
Git
 
Day 2_ Get Git with It! A Developer's Workshop.pptx
Day 2_ Get Git with It! A Developer's Workshop.pptxDay 2_ Get Git with It! A Developer's Workshop.pptx
Day 2_ Get Git with It! A Developer's Workshop.pptx
 
Git
GitGit
Git
 
Git Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdfGit Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdf
 
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, TrivandrumIntroduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
 
Git: a tool for wizards
Git: a tool for wizardsGit: a tool for wizards
Git: a tool for wizards
 
Brief tutorial on Git
Brief tutorial on GitBrief tutorial on Git
Brief tutorial on Git
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptx
 
An introductory guide to GIT
An introductory guide to GITAn introductory guide to GIT
An introductory guide to GIT
 
Git and github fundamentals
Git and github fundamentalsGit and github fundamentals
Git and github fundamentals
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech Article
 
introduction in version control system
introduction in version control systemintroduction in version control system
introduction in version control system
 

More from Yan Vugenfirer

HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers - Kostiantyn Ko...
HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers - Kostiantyn Ko...HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers - Kostiantyn Ko...
HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers - Kostiantyn Ko...Yan Vugenfirer
 
Receive side scaling (RSS) with eBPF in QEMU and virtio-net
Receive side scaling (RSS) with eBPF in QEMU and virtio-netReceive side scaling (RSS) with eBPF in QEMU and virtio-net
Receive side scaling (RSS) with eBPF in QEMU and virtio-netYan Vugenfirer
 
Implementing SR-IOv failover for Windows guests during live migration
Implementing SR-IOv failover for Windows guests during live migrationImplementing SR-IOv failover for Windows guests during live migration
Implementing SR-IOv failover for Windows guests during live migrationYan Vugenfirer
 
Qemu device prototyping
Qemu device prototypingQemu device prototyping
Qemu device prototypingYan Vugenfirer
 
Windows network teaming
Windows network teamingWindows network teaming
Windows network teamingYan Vugenfirer
 
Rebuild presentation - IoT Israel MeetUp
Rebuild presentation - IoT Israel MeetUpRebuild presentation - IoT Israel MeetUp
Rebuild presentation - IoT Israel MeetUpYan Vugenfirer
 
Rebuild presentation during Docker's Birthday party
Rebuild presentation during Docker's Birthday partyRebuild presentation during Docker's Birthday party
Rebuild presentation during Docker's Birthday partyYan Vugenfirer
 
Contributing to open source using Git
Contributing to open source using GitContributing to open source using Git
Contributing to open source using GitYan Vugenfirer
 
Microsoft Hardware Certification Kit (HCK) setup
Microsoft Hardware Certification Kit (HCK) setupMicrosoft Hardware Certification Kit (HCK) setup
Microsoft Hardware Certification Kit (HCK) setupYan Vugenfirer
 
Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio ...
Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio ...Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio ...
Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio ...Yan Vugenfirer
 
Advanced NDISTest options
Advanced NDISTest optionsAdvanced NDISTest options
Advanced NDISTest optionsYan Vugenfirer
 
QEMU Development and Testing Automation Using MS HCK - Anton Nayshtut and Yan...
QEMU Development and Testing Automation Using MS HCK - Anton Nayshtut and Yan...QEMU Development and Testing Automation Using MS HCK - Anton Nayshtut and Yan...
QEMU Development and Testing Automation Using MS HCK - Anton Nayshtut and Yan...Yan Vugenfirer
 
Windows guest debugging presentation from KVM Forum 2012
Windows guest debugging presentation from KVM Forum 2012Windows guest debugging presentation from KVM Forum 2012
Windows guest debugging presentation from KVM Forum 2012Yan Vugenfirer
 

More from Yan Vugenfirer (14)

HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers - Kostiantyn Ko...
HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers - Kostiantyn Ko...HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers - Kostiantyn Ko...
HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers - Kostiantyn Ko...
 
Receive side scaling (RSS) with eBPF in QEMU and virtio-net
Receive side scaling (RSS) with eBPF in QEMU and virtio-netReceive side scaling (RSS) with eBPF in QEMU and virtio-net
Receive side scaling (RSS) with eBPF in QEMU and virtio-net
 
Implementing SR-IOv failover for Windows guests during live migration
Implementing SR-IOv failover for Windows guests during live migrationImplementing SR-IOv failover for Windows guests during live migration
Implementing SR-IOv failover for Windows guests during live migration
 
Qemu device prototyping
Qemu device prototypingQemu device prototyping
Qemu device prototyping
 
Windows network teaming
Windows network teamingWindows network teaming
Windows network teaming
 
Rebuild presentation - IoT Israel MeetUp
Rebuild presentation - IoT Israel MeetUpRebuild presentation - IoT Israel MeetUp
Rebuild presentation - IoT Israel MeetUp
 
Rebuild presentation during Docker's Birthday party
Rebuild presentation during Docker's Birthday partyRebuild presentation during Docker's Birthday party
Rebuild presentation during Docker's Birthday party
 
Contributing to open source using Git
Contributing to open source using GitContributing to open source using Git
Contributing to open source using Git
 
Microsoft Hardware Certification Kit (HCK) setup
Microsoft Hardware Certification Kit (HCK) setupMicrosoft Hardware Certification Kit (HCK) setup
Microsoft Hardware Certification Kit (HCK) setup
 
UsbDk at a Glance 
UsbDk at a Glance UsbDk at a Glance 
UsbDk at a Glance 
 
Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio ...
Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio ...Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio ...
Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio ...
 
Advanced NDISTest options
Advanced NDISTest optionsAdvanced NDISTest options
Advanced NDISTest options
 
QEMU Development and Testing Automation Using MS HCK - Anton Nayshtut and Yan...
QEMU Development and Testing Automation Using MS HCK - Anton Nayshtut and Yan...QEMU Development and Testing Automation Using MS HCK - Anton Nayshtut and Yan...
QEMU Development and Testing Automation Using MS HCK - Anton Nayshtut and Yan...
 
Windows guest debugging presentation from KVM Forum 2012
Windows guest debugging presentation from KVM Forum 2012Windows guest debugging presentation from KVM Forum 2012
Windows guest debugging presentation from KVM Forum 2012
 

Recently uploaded

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Recently uploaded (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Introduction to Git

  • 1. Introduction to Sameeh Jubran, Sameeh@daynix.com
  • 2. Why git is useful?
  • 5. Use cases Consider this scenario: ● You have a homework submission in Matam for today and the assignment is ready for submission ● While testing it you discovered a minor bug and decided to fix it
  • 6. Use cases ● After attempting to do so, you accidentally changed a working code and got yourself in a big mess ● You no longer remember what was and what wasn’t there ● It is 23:58 PM
  • 7. Now you realize that CTRL + Z won’t solve your problems
  • 9. What is git? ● Open source project originally developed in 2005 by Linus Torvalds ● A command line utility ● You can imagine git as something that sits on top of your file system and manipulates files. ● A distributed version control system - DCVS
  • 10. What is “distributed version control system” ? ● Version control system is a system that records changes to a file or set of files over time so that you can recall specific versions later ● Distributed means that there is no main server and all of the full history of the project is available once you cloned the project.
  • 11. A brief history ● In 2002, the Linux kernel project began using a DVCS called BitKeeper ● In 2005, the commercial company that developed BitKeeper broke down, and the tool’s free-of-charge status was revoked ● This prompted the Linux development community (and in particular Linus Torvalds, the creator of Linux) to develop their own tool - git
  • 12. Demo
  • 13. ● You can imagine git as something that sits on top of your file system and manipulates files. ● This “something” is a tree structure where each commit creates a new node in that tree. ● Nearly all git commands actually serve to navigate on this tree and to manipulate it accordingly. git branch commit
  • 15. git repository ● The purpose of git is to manage a project, or a set of files, as they change over time. Git stores this information in a data structure called a repository ● A git repository contains, mainly: ○ A set of commits
  • 16. Commit ● A commit object mainly contains three things: ○ A set of changes the commit introduces ○ Commit message describing the changes ○ A hash, a 40-character string that uniquely identifies the commit object
  • 17. Commit Commit id (hash) Commit message The change the commit introduces
  • 19. Github ● GitHub is a web-based Git repository hosting service
  • 20. git workflow How commits are created? Introduce changes Add the change to staging area Make that change “permanent” git add git commit
  • 21. The three steps of git ● Introduce a change: introduce a change to a file that is being tracked by git ● Add the actual change to staging area: Add the change you actually want using “git add” ● Commit: Commit the change that has been added using git commit Add the change to staging area Make that change “permanent” git add git commit Introduce changes
  • 24. git commands ● For most of the basic interactions with git you’ll mainly use 7 commands that we’ll cover here
  • 25. git commands ● git init ● git clone ● git log ● git diff ● git status ● git add ● git commit
  • 26. git init ● Creates a new git repository ● Can be used to convert an existing, unversioned project to a git repository or initialize a new empty repository
  • 27. git clone ● Copies an existing git repository
  • 28. git log Shows the commit logs
  • 29. git add ● Adds changes Introduce a change Add the change to staging area Make that change “permanent” git add git commit
  • 30. git commit ● Creates a commit out of the changes that had been added Introduce a change Add the change to staging area Make that change “permanent” git add git commit
  • 31. git diff ● Displays the change that was introduced Useful flag: ● --cached: Displays the change that was added using “git add”
  • 32. git status ● Displays the file names that has been modified, added and untracked
  • 33. Bonus command: git checkout ● Checking out a commit makes the entire working directory match that commit
  • 34. Q&A