SlideShare une entreprise Scribd logo
1  sur  13
Git Basics


Presentation: 0.5hr
Workshop: 1hr                      © Terence Chia
Revision: 1.2                      1 September 2010
Git Basics
●   Introduction   ●   Git Migration
●   Get Started    ●   Git Clients
●   Start Coding   ●   Git Community
●   Team           ●   Git Resources
     Development
Getting Started
●   $git init       ●   Starts a new local git
●
                        repository
●   $git clone
                    ●   Gets a copy of a remote
                        repository
●
Start Coding
●   $git add         ●   Add modified files to
●
                         “stage”. This prepares
                         you to commit the files.
●
                     ●   Commits file to
●   $git commit          repository
●
What have I done?!
●   $git status    ●   Reveals code status
●   $git log       ●   Shows change log
●   $git diff      ●   Shows diff of changed
●
                       files
●   $git show
                   ●   Shows diff by commits
●   $git help
                   ●   General Git help
●


●


●
Team Development
●   Setup Identity
●   Setup a shared repository
●   Basic ways of avoiding conflicts
●   Branching
●   Merging
Team Development
    ●   $git config                             ●   Setup user
●       $ git config –global user.name “DevA”       configuration & contact
●       $git config –global user.email
        “DevA@site.com”                             details
    ●   $git pull                               ●   Pull down changes
    ●   $git push                               ●   Push your updates
    ●   $git stash                              ●   Stash your changes.
                                                    Restore to original state
Bye bye SVN, CVS

           ● Git exceeds basic SCM features
           ● CVS, SVN are history

           ● Migration from SVN to GIT is simple

           ● But prepare your SVN users & repository first




    ●   $git svn
●       $ git svn clone http://svn/repo/here/trunk
Git Clients
●   Linux, Windows, MacOS tools
●   Command line
●   Git Bash
●   GitK
●   Alot of Git dev integration tools out there.
Git Clients
●   Linux, Windows, MacOS tools
●   Command line
●   Git Bash
●   GitK
●   Alot of Git dev integration tools out there.
Git Community
●   Git is open sourced under GPLv2
●   Public Repositories
    – http://github.com
    – http://bitbucket.org
●   DIY Public Repositories
Git Resources
●   http://git-scm.com
●   http://wiki.glitchdata.com/index.php?title=Git
●   http://gitready.com/
●   Alot of resources available
Thank You
●   Let's Practice
●   Exercises




                                 © Terence Chia
                                 1 September 2010

Contenu connexe

Tendances

Get Familiar With Git
Get Familiar With Git Get Familiar With Git
Get Familiar With Git Nigam Goyal
 
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
 
Version Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an exampleVersion Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an exampleGaurav Kumar Garg
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Gitkhelll
 
Contributing to open source using Git
Contributing to open source using GitContributing to open source using Git
Contributing to open source using GitYan Vugenfirer
 
Debian packaging talk, Pysheff sept 2012
Debian packaging talk, Pysheff sept 2012Debian packaging talk, Pysheff sept 2012
Debian packaging talk, Pysheff sept 2012takluyver
 
Helios in Action: Git at Eclipse
Helios in Action: Git at EclipseHelios in Action: Git at Eclipse
Helios in Action: Git at EclipseChris Aniszczyk
 
Git - the stupid content tracker
Git - the stupid content trackerGit - the stupid content tracker
Git - the stupid content trackerEric Johnson
 

Tendances (20)

Get Familiar With Git
Get Familiar With Git Get Familiar With Git
Get Familiar With Git
 
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 advanced
Git advancedGit advanced
Git advanced
 
Version Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an exampleVersion Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an example
 
Git 1
Git 1Git 1
Git 1
 
Git
GitGit
Git
 
Git: Git'ing the Basic
Git: Git'ing the BasicGit: Git'ing the Basic
Git: Git'ing the Basic
 
Hg for bioinformatics, second part
Hg for bioinformatics, second partHg for bioinformatics, second part
Hg for bioinformatics, second part
 
Git in Eclipse
Git in EclipseGit in Eclipse
Git in Eclipse
 
Hg version control bioinformaticians
Hg version control bioinformaticiansHg version control bioinformaticians
Hg version control bioinformaticians
 
Git.odp 0
Git.odp 0Git.odp 0
Git.odp 0
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git training with Devaamo
Git training with DevaamoGit training with Devaamo
Git training with Devaamo
 
Contributing to open source using Git
Contributing to open source using GitContributing to open source using Git
Contributing to open source using Git
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Debian packaging talk, Pysheff sept 2012
Debian packaging talk, Pysheff sept 2012Debian packaging talk, Pysheff sept 2012
Debian packaging talk, Pysheff sept 2012
 
Helios in Action: Git at Eclipse
Helios in Action: Git at EclipseHelios in Action: Git at Eclipse
Helios in Action: Git at Eclipse
 
Docker&kubernetes
Docker&kubernetesDocker&kubernetes
Docker&kubernetes
 
Git - the stupid content tracker
Git - the stupid content trackerGit - the stupid content tracker
Git - the stupid content tracker
 
Introduction To Git
Introduction To GitIntroduction To Git
Introduction To Git
 

Similaire à Git basics

Git: Why And How to
Git: Why And How toGit: Why And How to
Git: Why And How tolanhuonga3
 
GIT_GITHUB_2016_06_17
GIT_GITHUB_2016_06_17GIT_GITHUB_2016_06_17
GIT_GITHUB_2016_06_17siva ram
 
Why Git Sucks and you'll use it anyways
Why Git Sucks and you'll use it anywaysWhy Git Sucks and you'll use it anyways
Why Git Sucks and you'll use it anywaysCarlos Taborda
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git TutorialSage Sharp
 
Git is a distributed version control system .
Git is a distributed version control system .Git is a distributed version control system .
Git is a distributed version control system .HELLOWorld889594
 
GIT workshop at Selenium Conference 2018
GIT workshop at Selenium Conference 2018GIT workshop at Selenium Conference 2018
GIT workshop at Selenium Conference 2018Pooja Shah
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configurationKishor Kumar
 
You're doing it wrong! Git it right!
You're doing it wrong! Git it right!You're doing it wrong! Git it right!
You're doing it wrong! Git it right!Cory Webb
 
Enterprise git
Enterprise gitEnterprise git
Enterprise gitPedro Melo
 
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 levelsGorav Singal
 
The Fundamentals of Git
The Fundamentals of GitThe Fundamentals of Git
The Fundamentals of GitDivineOmega
 

Similaire à Git basics (20)

Git: Why And How to
Git: Why And How toGit: Why And How to
Git: Why And How to
 
GIT_GITHUB_2016_06_17
GIT_GITHUB_2016_06_17GIT_GITHUB_2016_06_17
GIT_GITHUB_2016_06_17
 
Why Git Sucks and you'll use it anyways
Why Git Sucks and you'll use it anywaysWhy Git Sucks and you'll use it anyways
Why Git Sucks and you'll use it anyways
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
 
Github basics
Github basicsGithub basics
Github basics
 
Git is a distributed version control system .
Git is a distributed version control system .Git is a distributed version control system .
Git is a distributed version control system .
 
簡單介紹git
簡單介紹git簡單介紹git
簡單介紹git
 
Git presentation
Git presentationGit presentation
Git presentation
 
Git presentation
Git presentationGit presentation
Git presentation
 
GIT-FirstPart.ppt
GIT-FirstPart.pptGIT-FirstPart.ppt
GIT-FirstPart.ppt
 
Git
GitGit
Git
 
GIT workshop at Selenium Conference 2018
GIT workshop at Selenium Conference 2018GIT workshop at Selenium Conference 2018
GIT workshop at Selenium Conference 2018
 
Git training
Git trainingGit training
Git training
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
Git and GitHub Info Session
Git and GitHub Info SessionGit and GitHub Info Session
Git and GitHub Info Session
 
Git 101 for_tarad_dev
Git 101 for_tarad_devGit 101 for_tarad_dev
Git 101 for_tarad_dev
 
You're doing it wrong! Git it right!
You're doing it wrong! Git it right!You're doing it wrong! Git it right!
You're doing it wrong! Git it right!
 
Enterprise git
Enterprise gitEnterprise git
Enterprise git
 
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
 
The Fundamentals of Git
The Fundamentals of GitThe Fundamentals of Git
The Fundamentals of Git
 

Dernier

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
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
 
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
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 

Dernier (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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
 
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...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

Git basics

  • 1. Git Basics Presentation: 0.5hr Workshop: 1hr © Terence Chia Revision: 1.2 1 September 2010
  • 2. Git Basics ● Introduction ● Git Migration ● Get Started ● Git Clients ● Start Coding ● Git Community ● Team ● Git Resources Development
  • 3. Getting Started ● $git init ● Starts a new local git ● repository ● $git clone ● Gets a copy of a remote repository ●
  • 4. Start Coding ● $git add ● Add modified files to ● “stage”. This prepares you to commit the files. ● ● Commits file to ● $git commit repository ●
  • 5. What have I done?! ● $git status ● Reveals code status ● $git log ● Shows change log ● $git diff ● Shows diff of changed ● files ● $git show ● Shows diff by commits ● $git help ● General Git help ● ● ●
  • 6. Team Development ● Setup Identity ● Setup a shared repository ● Basic ways of avoiding conflicts ● Branching ● Merging
  • 7. Team Development ● $git config ● Setup user ● $ git config –global user.name “DevA” configuration & contact ● $git config –global user.email “DevA@site.com” details ● $git pull ● Pull down changes ● $git push ● Push your updates ● $git stash ● Stash your changes. Restore to original state
  • 8. Bye bye SVN, CVS ● Git exceeds basic SCM features ● CVS, SVN are history ● Migration from SVN to GIT is simple ● But prepare your SVN users & repository first ● $git svn ● $ git svn clone http://svn/repo/here/trunk
  • 9. Git Clients ● Linux, Windows, MacOS tools ● Command line ● Git Bash ● GitK ● Alot of Git dev integration tools out there.
  • 10. Git Clients ● Linux, Windows, MacOS tools ● Command line ● Git Bash ● GitK ● Alot of Git dev integration tools out there.
  • 11. Git Community ● Git is open sourced under GPLv2 ● Public Repositories – http://github.com – http://bitbucket.org ● DIY Public Repositories
  • 12. Git Resources ● http://git-scm.com ● http://wiki.glitchdata.com/index.php?title=Git ● http://gitready.com/ ● Alot of resources available
  • 13. Thank You ● Let's Practice ● Exercises © Terence Chia 1 September 2010