SlideShare a Scribd company logo
1 of 95
Introduction to GIT
    Boby - Thenetcircle 2010
Plan

• Basics
• Workflow
• Roadmap
Basics

• What is GIT?
• How does it work?
• Why shall i use GIT?
What is GIT?

• Version control system
• Distributed
• Modern
• Created by Linus Torvald
Distributed?
     • No central repository
     • Mostly local
     • Remote access
                               u1        u3
     Central
                                    u2
u1     u2      u3
                               u4
Modern

• Fast
• Clean
• Rethink of VCS
Usage

• Linux kernel
• Symfony 2
• asOauthPlugin
• Many others on github, gitorious...
How?

• Key-value storage
• File based
• Checksum via SHA-1
• Inside the .git folder
How?




http://progit.org/book/ch1-3.html
How?




http://progit.org/book/ch1-3.html
How?

• Commits are snapshots
• Modified files are copied
• Unmodified files keep the same reference
How?
  Head                                 Head
                     Change file B
Rev 3AB40           Commit changes   Rev 98FD0

  Folder 290FF                         Folder 290FF

    File A 343BA                         File A 343BA
    File B FF0934                        File B 5589A
What about SVN?

• Old, slow, complex
• Merges are a pain!!!
• Merges suck!!!
What about others?


• Mercurial, Bazaar... all distributed VCS
•   The rest (VSS, CVS...)
Basic workflow


• Initialize a repository
• Adding a file
Basic workflow

• Modifying a file
• Viewing the difference
• Committing
What is this add crap?

• The “index” !!!
• Another step in the workflow
• Act as staging area
Basic workflow




http://marklodato.github.com/visual-git-guide/
Basic workflow

• Make 2 modifications on the same file
• Commit the first one
• Commit the second one
Branch workflow

• Create a new branch
• Modify some stuff
• Commit in this branch
Branch workflow


• Merge my new branch back to main
• Commit
Branch workflow

• Modify branch test
• Modify branch master
• Merge
• Solve conflict
Branch workflow

• Modify branch test
• Modify branch master
• Update test from master
Branch workflow
 Master              Branch test

            Branch
Rev 3AB40            Rev 3AB40
Rev AE449            Rev 34E79
Rev CC34F
Branch workflow
 Master              Branch test


Rev 3AB40            Rev 3AB40
Rev AE449            Rev AE449
            Rebase

Rev CC34F            Rev CC34F
                     Rev 34E79
Update your branch from the main =
“git rebase main” =
2 seconds =
Holly crap!!!
 Awesome!!!
Bye bye SVN!!!
Remote workflow

• Checkout a remote branch
• Modify
• Send the modification to the remote
External workflow

• git submodule:
 - longer workflow
 - allows direct co/push
• git subtree
• external dependency manager
Dev workflow
• Clone the main branch
• Create branch for feature
• Commit changes inside
• Rebase often to keep the branch up to date
• Push back
• Tell the maintainer to merge your changes
Main repo




                                                               }
       master
git clone
            git pull      git merge
 git pull
                                                                   remote
                                                                    server

     Boby repo         git checkout -b       Boby repo
      master                                eflower feat




                                                               }
                                       git clone
                                        git pull    git push
                                      git rebase
                                                                     local

                                          Working copy
                                          eflower feat
Roadmap
• Install git
• Training
• Transition with git-svn
• Move all branches/script to git
• End of SVN
• Enjoy!
Installation?

• Version 1.7 of GIT

• CLI
• tortoise git for designer
• Remote repository with Gitorious
Links

• http://progit.org/book/
• http://marklodato.github.com/visual-git-guide/
• http://hginit.com/
• http://git.or.cz/course/svn.html
Questions?

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 training v10
Git training v10Git training v10
Git training v10
 
Github
GithubGithub
Github
 
Basic Git Intro
Basic Git IntroBasic Git Intro
Basic Git Intro
 
Git slides
Git slidesGit slides
Git slides
 
Git basic
Git basicGit basic
Git basic
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
 
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
Introduction to GitIntroduction to Git
Introduction to Git
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash Course
 
Github basics
Github basicsGithub basics
Github basics
 
Git
GitGit
Git
 
Git Terminologies
Git TerminologiesGit Terminologies
Git Terminologies
 
Grokking opensource with github
Grokking opensource with githubGrokking opensource with github
Grokking opensource with github
 
Github
GithubGithub
Github
 
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
 
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 real slides
Git real slidesGit real slides
Git real slides
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
 

Similar to Introduction To Git

Git basic stanley hsiao 2010_12_15
Git basic stanley hsiao 2010_12_15Git basic stanley hsiao 2010_12_15
Git basic stanley hsiao 2010_12_15
Chen-Han Hsiao
 
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
 
Why You Should Be Using Git
Why You Should Be Using GitWhy You Should Be Using Git
Why You Should Be Using Git
Francisco Vieira
 
3 Git
3 Git3 Git

Similar to Introduction To Git (20)

Git Tech Talk
Git  Tech TalkGit  Tech Talk
Git Tech Talk
 
Git
GitGit
Git
 
Git basic stanley hsiao 2010_12_15
Git basic stanley hsiao 2010_12_15Git basic stanley hsiao 2010_12_15
Git basic stanley hsiao 2010_12_15
 
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
 
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
 
git and github
git and githubgit and github
git and github
 
Git tips and tricks
Git   tips and tricksGit   tips and tricks
Git tips and tricks
 
Git
GitGit
Git
 
Git
GitGit
Git
 
Why You Should Be Using Git
Why You Should Be Using GitWhy You Should Be Using Git
Why You Should Be Using Git
 
Git, GitHub and Open Source
Git, GitHub and Open SourceGit, GitHub and Open Source
Git, GitHub and Open Source
 
Collaborative development with git
Collaborative development with gitCollaborative development with git
Collaborative development with git
 
Github
GithubGithub
Github
 
Gitlikeapro 2019
Gitlikeapro 2019Gitlikeapro 2019
Gitlikeapro 2019
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
Source control management
Source control managementSource control management
Source control management
 
Git Basics at Rails Underground
Git Basics at Rails UndergroundGit Basics at Rails Underground
Git Basics at Rails Underground
 
3 Git
3 Git3 Git
3 Git
 
Git Basics Philips
Git Basics PhilipsGit Basics Philips
Git Basics Philips
 
Git first steps
Git first stepsGit first steps
Git first steps
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Introduction To Git

Editor's Notes