SlideShare ist ein Scribd-Unternehmen logo
1 von 49
Downloaden Sie, um offline zu lesen
Distributed version control with git
— a brief introduction


Joel Krebs
Slides by Oscar Nierstrasz
Why git?
Bob
Bob
      Carol
Bob
        Carol




Alice
          Ted
Bob
                                 Carol




Alice
                                   Ted

        A recipe for disaster!
What is git?
> Distributed revision control system
> Originally developed by Linus Torvalds for the
  development of the Linux Kernel in 2005
> Focus on speed and efficiency
> Quite a unique design and therefore sometimes a bit
  scary and difficult to understand
The git object model
A “blob” is content under
 version control (a file)

          blob
You can have trees of blobs
    (directories of files)

            tree
 blob
            tree
 blob
           blob
A “commit” is a tree of blobs
     (a set of changes)

           commit


            tree
 blob
            tree
 blob
            blob
Most commits modify
                (or merge) earlier
                     commits
                      commit
       commit
                       tree

        tree
                       blob
blob
        tree
blob
        blob
You can “tag” an
interesting commit

        tag
                         commit
                commit
                          tree

                 tree
                          blob
      blob
                 tree
      blob
                 blob
A graph of commits
may belong to a branch   branch

    tag
                         commit
           commit
                          tree

            tree
                          blob
  blob
            tree
  blob
            blob
HEAD
  “HEAD “is the
  current branch
                   branch

  tag
                   commit
         commit
                    tree

          tree
                    blob
blob
          tree
blob
          blob
HEAD


                  branch


                  commit
     commit




Let’s focus on commits
     and branches
Basic git
Create a git repo
                    HEAD

                    master

                     C0
Tell git to “stage”
              changes
HEAD

master

 C0
HEAD

master   Commit your
          changes
 C1

 C0
Collaborating
John                           Jane


Local repo   Public repo   Local repo



                master


                 C1


                 C0
John                            Jane


Local repo   Public repo   Local repo



   master       master        master


    C1           C1            C1


    C0           C0            C0
John                            Jane


Local repo   Public repo   Local repo



   master       master        master


    C2           C1            C3


    C1           C0            C1


    C0                         C0
John                                   Jane


    Local repo          Public repo   Local repo



       master              master        master


        C2                  C1            C3


        C1                  C0            C1


        C0                                C0




(nothing new to pull)
John                            Jane


Local repo   Public repo   Local repo



   master       master        master


    C2           C2            C3


    C1           C1            C1


    C0           C0            C0
John                            Jane


Local repo   Public repo   Local repo



   master       master        master


    C2           C2            C3      C2


    C1           C1            C1


    C0           C0            C0
John                                Jane


Local repo    Public repo      Local repo



   master        master           master


    C2            C2               C4


    C1            C1               C3      C2


    C0            C0               C1


                                   C0




             NB: git pull = fetch + merge
John                               Jane


Local repo   Public repo      Local repo



   master       master           master


    C2           C4               C4


    C1           C3      C2       C3      C2


    C0           C1               C1


                 C0               C0
John                                   Jane


Local repo       Public repo      Local repo



   master           master           master


    C4               C4               C4


    C3      C2       C3      C2       C3      C2


    C1               C1               C1


    C0               C0               C0
Branching
and merging
“origin” refers to the
                    remote repo


   HEAD

   master

origin/master

     C1

     C0
HEAD

                master

origin/master    C2

                 C1

                 C0
HEAD
                         tryout
                master

origin/master    C2

                 C1

                 C0
HEAD

                          tryout
                master

origin/master    C2

                 C1      NB: git checkout –b … =
                            branch + checkout
                 C0
HEAD

                         tryout
                master
                          C3
origin/master    C2

                 C1

                 C0
HEAD

         tryout
master
          C3      C5
 C2
                       origin/master
 C1       C4      C6

 C0                    origin/idea
HEAD

              tryout

               C7
master
         C3    C5
 C2
                       origin/master
 C1      C4    C6

 C0                    origin/idea
tryout
HEAD
               C7
master
         C3    C5
 C2
                       origin/master
 C1      C4    C6

 C0                    origin/idea
HEAD
              tryout
master
               C7
 C8
         C3    C5
 C2
                       origin/master
 C1      C4    C6

 C0                    origin/idea
HEAD
                              tryout
                master
                               C7
origin/master    C8
                         C3    C5
                 C2

                 C1      C4    C6

                 C0                    origin/idea
Overview git workflow



               Remote repository
                  fetch               push
                          Local repository
        pull                          commit
               checkout      Index (cache)
               HEAD                   add
                Working directory
Getting started
First steps

> Follow instructions on P2 Blog for installation
> Send your ssh public key to joel.krebs@students.unibe.ch
> Create meaningful commits with according messages
> Hints that make your life easier:
  —Create a .gitignore file
  —Always pull before you push
  —Don’t panic when merge conflicts occur
More to git
More to git …



> Merging and mergetool
> Squashing commits when merging
> Resolving conflicts
> User authentication with ssh
> gitx and other graphical tools
> git configure — remembering your name
> git remote — multiple remote repos
> github — an open source public repo
> …
Resources



   http://git-scm.com/                  http://book.git-scm.com/index.html



                 http://gitready.com/



                                   https://github.com/




http://www.slideshare.net/chacon/getting-git             http://oreilly.com/
http://creativecommons.org/licenses/by-sa/3.0/

Weitere ähnliche Inhalte

Was ist angesagt? (20)

Github basics
Github basicsGithub basics
Github basics
 
Git and git flow
Git and git flowGit and git flow
Git and git flow
 
Git Introduction Tutorial
Git Introduction TutorialGit Introduction Tutorial
Git Introduction Tutorial
 
Git and Github Session
Git and Github SessionGit and Github Session
Git and Github Session
 
Git基礎介紹
Git基礎介紹Git基礎介紹
Git基礎介紹
 
Git
GitGit
Git
 
Git collaboration
Git collaborationGit collaboration
Git collaboration
 
git and github
git and githubgit and github
git and github
 
Introduction To Git
Introduction To GitIntroduction To Git
Introduction To Git
 
Git Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial I
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Git & GitHub WorkShop
Git & GitHub WorkShopGit & GitHub WorkShop
Git & GitHub WorkShop
 
Basic Git Intro
Basic Git IntroBasic Git Intro
Basic Git Intro
 
Git and Github
Git and GithubGit and Github
Git and Github
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
 
Git and GitHub for Documentation
Git and GitHub for DocumentationGit and GitHub for Documentation
Git and GitHub for Documentation
 
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 e GitHub
Git e GitHubGit e GitHub
Git e GitHub
 
Git real slides
Git real slidesGit real slides
Git real slides
 

Andere mochten auch

Best Practices in Exception Handling
Best Practices in Exception HandlingBest Practices in Exception Handling
Best Practices in Exception HandlingLemi Orhan Ergin
 
Getting Git Right
Getting Git RightGetting Git Right
Getting Git RightSven Peters
 
Git 사용 가이드
Git 사용 가이드Git 사용 가이드
Git 사용 가이드도형 임
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to GitLukas Fittl
 
svn 능력자를 위한 git 개념 가이드
svn 능력자를 위한 git 개념 가이드svn 능력자를 위한 git 개념 가이드
svn 능력자를 위한 git 개념 가이드Insub Lee
 
Git는 머꼬? GitHub는 또 머지?
Git는 머꼬? GitHub는 또 머지?Git는 머꼬? GitHub는 또 머지?
Git는 머꼬? GitHub는 또 머지?Ian Choi
 
Introduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guideIntroduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guideRohit Arora
 
버전관리를 들어본적 없는 사람들을 위한 DVCS - Git
버전관리를 들어본적 없는 사람들을 위한 DVCS - Git버전관리를 들어본적 없는 사람들을 위한 DVCS - Git
버전관리를 들어본적 없는 사람들을 위한 DVCS - Git민태 김
 

Andere mochten auch (11)

Git basic
Git basicGit basic
Git basic
 
Best Practices in Exception Handling
Best Practices in Exception HandlingBest Practices in Exception Handling
Best Practices in Exception Handling
 
Git Branching Model
Git Branching ModelGit Branching Model
Git Branching Model
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Getting Git Right
Getting Git RightGetting Git Right
Getting Git Right
 
Git 사용 가이드
Git 사용 가이드Git 사용 가이드
Git 사용 가이드
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
svn 능력자를 위한 git 개념 가이드
svn 능력자를 위한 git 개념 가이드svn 능력자를 위한 git 개념 가이드
svn 능력자를 위한 git 개념 가이드
 
Git는 머꼬? GitHub는 또 머지?
Git는 머꼬? GitHub는 또 머지?Git는 머꼬? GitHub는 또 머지?
Git는 머꼬? GitHub는 또 머지?
 
Introduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guideIntroduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guide
 
버전관리를 들어본적 없는 사람들을 위한 DVCS - Git
버전관리를 들어본적 없는 사람들을 위한 DVCS - Git버전관리를 들어본적 없는 사람들을 위한 DVCS - Git
버전관리를 들어본적 없는 사람들을 위한 DVCS - Git
 

Ähnlich wie Quick Introduction to git

Understanding git
Understanding gitUnderstanding git
Understanding gitAvik Das
 
Git data model
Git data modelGit data model
Git data modelLin Liu
 
GIT rozproszony system kontroli wersji
GIT rozproszony system kontroli wersjiGIT rozproszony system kontroli wersji
GIT rozproszony system kontroli wersji3camp
 
Let the contribution begin
Let the contribution beginLet the contribution begin
Let the contribution beginSeongJae Park
 
That's (g)it! par Sébastien Dawans CETIC
That's (g)it! par Sébastien Dawans CETICThat's (g)it! par Sébastien Dawans CETIC
That's (g)it! par Sébastien Dawans CETICLa FeWeb
 

Ähnlich wie Quick Introduction to git (8)

Git社内勉強会
Git社内勉強会Git社内勉強会
Git社内勉強会
 
Understanding git
Understanding gitUnderstanding git
Understanding git
 
M.Mozūras - git
M.Mozūras - gitM.Mozūras - git
M.Mozūras - git
 
Git data model
Git data modelGit data model
Git data model
 
GIT rozproszony system kontroli wersji
GIT rozproszony system kontroli wersjiGIT rozproszony system kontroli wersji
GIT rozproszony system kontroli wersji
 
Let the contribution begin
Let the contribution beginLet the contribution begin
Let the contribution begin
 
That's (g)it! par Sébastien Dawans CETIC
That's (g)it! par Sébastien Dawans CETICThat's (g)it! par Sébastien Dawans CETIC
That's (g)it! par Sébastien Dawans CETIC
 
Git Going with DVCS v1.6.0
Git Going with DVCS v1.6.0Git Going with DVCS v1.6.0
Git Going with DVCS v1.6.0
 

Kürzlich hochgeladen

📞 Contact Number 8617697112 VIP Ganderbal Call Girls
📞 Contact Number 8617697112 VIP Ganderbal Call Girls📞 Contact Number 8617697112 VIP Ganderbal Call Girls
📞 Contact Number 8617697112 VIP Ganderbal Call GirlsNitya salvi
 
Jodhpur Park ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi ...
Jodhpur Park ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi ...Jodhpur Park ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi ...
Jodhpur Park ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi ...ritikasharma
 
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034 Independent Chenna...
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034  Independent Chenna...Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034  Independent Chenna...
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034 Independent Chenna... Shivani Pandey
 
Borum Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Borum Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort ServiceBorum Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Borum Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort ServiceDamini Dixit
 
Hire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls Agency
Hire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls AgencyHire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls Agency
Hire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls AgencyNitya salvi
 
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls Agency
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls AgencyHire 💕 8617697112 North Sikkim Call Girls Service Call Girls Agency
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls AgencyNitya salvi
 
Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...
Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...
Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...mriyagarg453
 
Verified Trusted Call Girls Singaperumal Koil Chennai ✔✔7427069034 Independe...
Verified Trusted Call Girls Singaperumal Koil Chennai ✔✔7427069034  Independe...Verified Trusted Call Girls Singaperumal Koil Chennai ✔✔7427069034  Independe...
Verified Trusted Call Girls Singaperumal Koil Chennai ✔✔7427069034 Independe... Shivani Pandey
 
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...ritikasharma
 
Ranikhet call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ranikhet call girls 📞 8617697112 At Low Cost Cash Payment BookingRanikhet call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ranikhet call girls 📞 8617697112 At Low Cost Cash Payment BookingNitya salvi
 
Model Call Girls In Ariyalur WhatsApp Booking 7427069034 call girl service 24...
Model Call Girls In Ariyalur WhatsApp Booking 7427069034 call girl service 24...Model Call Girls In Ariyalur WhatsApp Booking 7427069034 call girl service 24...
Model Call Girls In Ariyalur WhatsApp Booking 7427069034 call girl service 24... Shivani Pandey
 
Model VVIP Call Girls In Porur 👉 Chennai 🍬 7427069034 Escort Service & Hotel ...
Model VVIP Call Girls In Porur 👉 Chennai 🍬 7427069034 Escort Service & Hotel ...Model VVIP Call Girls In Porur 👉 Chennai 🍬 7427069034 Escort Service & Hotel ...
Model VVIP Call Girls In Porur 👉 Chennai 🍬 7427069034 Escort Service & Hotel ...hotbabesbook
 
📞 Contact Number 8617370543VIP Rajsamand Call Girls
📞 Contact Number 8617370543VIP Rajsamand Call Girls📞 Contact Number 8617370543VIP Rajsamand Call Girls
📞 Contact Number 8617370543VIP Rajsamand Call GirlsNitya salvi
 
Mumbai ] Call Girls Service Mumbai ₹7.5k Pick Up & Drop With Cash Payment 983...
Mumbai ] Call Girls Service Mumbai ₹7.5k Pick Up & Drop With Cash Payment 983...Mumbai ] Call Girls Service Mumbai ₹7.5k Pick Up & Drop With Cash Payment 983...
Mumbai ] Call Girls Service Mumbai ₹7.5k Pick Up & Drop With Cash Payment 983...hotbabesbook
 
Call Girls Bellandur ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bellandur ☎ 7737669865☎ Book Your One night Stand (Bangalore)Call Girls Bellandur ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bellandur ☎ 7737669865☎ Book Your One night Stand (Bangalore)amitlee9823
 
Call Girls In Warangal Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Warangal Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service En...Call Girls In Warangal Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Warangal Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service En...HyderabadDolls
 
Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034 Independent Chenna...
Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034  Independent Chenna...Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034  Independent Chenna...
Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034 Independent Chenna... Shivani Pandey
 
𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...rahim quresi
 

Kürzlich hochgeladen (20)

📞 Contact Number 8617697112 VIP Ganderbal Call Girls
📞 Contact Number 8617697112 VIP Ganderbal Call Girls📞 Contact Number 8617697112 VIP Ganderbal Call Girls
📞 Contact Number 8617697112 VIP Ganderbal Call Girls
 
Jodhpur Park ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi ...
Jodhpur Park ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi ...Jodhpur Park ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi ...
Jodhpur Park ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi ...
 
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
 
CHEAP Call Girls in Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in  Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in  Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034 Independent Chenna...
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034  Independent Chenna...Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034  Independent Chenna...
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034 Independent Chenna...
 
Borum Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Borum Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort ServiceBorum Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Borum Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
 
Hire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls Agency
Hire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls AgencyHire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls Agency
Hire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls Agency
 
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls Agency
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls AgencyHire 💕 8617697112 North Sikkim Call Girls Service Call Girls Agency
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls Agency
 
Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...
Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...
Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...
 
Verified Trusted Call Girls Singaperumal Koil Chennai ✔✔7427069034 Independe...
Verified Trusted Call Girls Singaperumal Koil Chennai ✔✔7427069034  Independe...Verified Trusted Call Girls Singaperumal Koil Chennai ✔✔7427069034  Independe...
Verified Trusted Call Girls Singaperumal Koil Chennai ✔✔7427069034 Independe...
 
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...
 
Ranikhet call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ranikhet call girls 📞 8617697112 At Low Cost Cash Payment BookingRanikhet call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ranikhet call girls 📞 8617697112 At Low Cost Cash Payment Booking
 
Model Call Girls In Ariyalur WhatsApp Booking 7427069034 call girl service 24...
Model Call Girls In Ariyalur WhatsApp Booking 7427069034 call girl service 24...Model Call Girls In Ariyalur WhatsApp Booking 7427069034 call girl service 24...
Model Call Girls In Ariyalur WhatsApp Booking 7427069034 call girl service 24...
 
Model VVIP Call Girls In Porur 👉 Chennai 🍬 7427069034 Escort Service & Hotel ...
Model VVIP Call Girls In Porur 👉 Chennai 🍬 7427069034 Escort Service & Hotel ...Model VVIP Call Girls In Porur 👉 Chennai 🍬 7427069034 Escort Service & Hotel ...
Model VVIP Call Girls In Porur 👉 Chennai 🍬 7427069034 Escort Service & Hotel ...
 
📞 Contact Number 8617370543VIP Rajsamand Call Girls
📞 Contact Number 8617370543VIP Rajsamand Call Girls📞 Contact Number 8617370543VIP Rajsamand Call Girls
📞 Contact Number 8617370543VIP Rajsamand Call Girls
 
Mumbai ] Call Girls Service Mumbai ₹7.5k Pick Up & Drop With Cash Payment 983...
Mumbai ] Call Girls Service Mumbai ₹7.5k Pick Up & Drop With Cash Payment 983...Mumbai ] Call Girls Service Mumbai ₹7.5k Pick Up & Drop With Cash Payment 983...
Mumbai ] Call Girls Service Mumbai ₹7.5k Pick Up & Drop With Cash Payment 983...
 
Call Girls Bellandur ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bellandur ☎ 7737669865☎ Book Your One night Stand (Bangalore)Call Girls Bellandur ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Bellandur ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 
Call Girls In Warangal Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Warangal Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service En...Call Girls In Warangal Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Warangal Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service En...
 
Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034 Independent Chenna...
Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034  Independent Chenna...Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034  Independent Chenna...
Verified Trusted Call Girls Ambattur Chennai ✔✔7427069034 Independent Chenna...
 
𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...
 

Quick Introduction to git

  • 1. Distributed version control with git — a brief introduction Joel Krebs Slides by Oscar Nierstrasz
  • 3. Bob
  • 4. Bob Carol
  • 5. Bob Carol Alice Ted
  • 6. Bob Carol Alice Ted A recipe for disaster!
  • 8. > Distributed revision control system > Originally developed by Linus Torvalds for the development of the Linux Kernel in 2005 > Focus on speed and efficiency > Quite a unique design and therefore sometimes a bit scary and difficult to understand
  • 10. A “blob” is content under version control (a file) blob
  • 11. You can have trees of blobs (directories of files) tree blob tree blob blob
  • 12. A “commit” is a tree of blobs (a set of changes) commit tree blob tree blob blob
  • 13. Most commits modify (or merge) earlier commits commit commit tree tree blob blob tree blob blob
  • 14. You can “tag” an interesting commit tag commit commit tree tree blob blob tree blob blob
  • 15. A graph of commits may belong to a branch branch tag commit commit tree tree blob blob tree blob blob
  • 16. HEAD “HEAD “is the current branch branch tag commit commit tree tree blob blob tree blob blob
  • 17. HEAD branch commit commit Let’s focus on commits and branches
  • 19. Create a git repo HEAD master C0
  • 20. Tell git to “stage” changes HEAD master C0
  • 21. HEAD master Commit your changes C1 C0
  • 23. John Jane Local repo Public repo Local repo master C1 C0
  • 24. John Jane Local repo Public repo Local repo master master master C1 C1 C1 C0 C0 C0
  • 25. John Jane Local repo Public repo Local repo master master master C2 C1 C3 C1 C0 C1 C0 C0
  • 26. John Jane Local repo Public repo Local repo master master master C2 C1 C3 C1 C0 C1 C0 C0 (nothing new to pull)
  • 27. John Jane Local repo Public repo Local repo master master master C2 C2 C3 C1 C1 C1 C0 C0 C0
  • 28. John Jane Local repo Public repo Local repo master master master C2 C2 C3 C2 C1 C1 C1 C0 C0 C0
  • 29. John Jane Local repo Public repo Local repo master master master C2 C2 C4 C1 C1 C3 C2 C0 C0 C1 C0 NB: git pull = fetch + merge
  • 30. John Jane Local repo Public repo Local repo master master master C2 C4 C4 C1 C3 C2 C3 C2 C0 C1 C1 C0 C0
  • 31. John Jane Local repo Public repo Local repo master master master C4 C4 C4 C3 C2 C3 C2 C3 C2 C1 C1 C1 C0 C0 C0
  • 33. “origin” refers to the remote repo HEAD master origin/master C1 C0
  • 34. HEAD master origin/master C2 C1 C0
  • 35. HEAD tryout master origin/master C2 C1 C0
  • 36. HEAD tryout master origin/master C2 C1 NB: git checkout –b … = branch + checkout C0
  • 37. HEAD tryout master C3 origin/master C2 C1 C0
  • 38. HEAD tryout master C3 C5 C2 origin/master C1 C4 C6 C0 origin/idea
  • 39. HEAD tryout C7 master C3 C5 C2 origin/master C1 C4 C6 C0 origin/idea
  • 40. tryout HEAD C7 master C3 C5 C2 origin/master C1 C4 C6 C0 origin/idea
  • 41. HEAD tryout master C7 C8 C3 C5 C2 origin/master C1 C4 C6 C0 origin/idea
  • 42. HEAD tryout master C7 origin/master C8 C3 C5 C2 C1 C4 C6 C0 origin/idea
  • 43. Overview git workflow Remote repository fetch push Local repository pull commit checkout Index (cache) HEAD add Working directory
  • 45. First steps > Follow instructions on P2 Blog for installation > Send your ssh public key to joel.krebs@students.unibe.ch > Create meaningful commits with according messages > Hints that make your life easier: —Create a .gitignore file —Always pull before you push —Don’t panic when merge conflicts occur
  • 47. More to git … > Merging and mergetool > Squashing commits when merging > Resolving conflicts > User authentication with ssh > gitx and other graphical tools > git configure — remembering your name > git remote — multiple remote repos > github — an open source public repo > …
  • 48. Resources http://git-scm.com/ http://book.git-scm.com/index.html http://gitready.com/ https://github.com/ http://www.slideshare.net/chacon/getting-git http://oreilly.com/