SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
Introduction     Basics           Using git   Other   final




               Git - the stupid content tracker

                           Henrik Austad

                          UNINETT Sigma A/S


                           15. Oct 2009
Introduction   Basics                Using git        Other   final



                             about:henrik




                            Henrik Austad
                        MSc Engineering Cybernetics


                   UNINETT Sigma A/S & NDGF
                             System Developer
Introduction              Basics            Using git        Other      final



               Background - In the beginning ... was patch



           • Initially written by Linus Torvalds to replace BitKeeper
           • First “working” version: April 18th 2005
           • git v1.0 December 21th 2005
           • Written for
                • Speed
                • Track changes
                • Large projects with active history
Introduction            Basics       Using git   Other   final



                                 Contenders




           • Bazaar (bzr)
           • Darcs
           • Mercurial (hg)
           • svk
Introduction             Basics     Using git   Other   final



                     What does “distributed” mean?




           • Everything is local.
Introduction             Basics          Using git     Other   final



                     What does “distributed” mean?




           • Everything is local.
           • No “need” for a centralized repository.
Introduction             Basics           Using git    Other   final



                     What does “distributed” mean?




           • Everything is local.
           • No “need” for a centralized repository.
           • Disk is cheap - network is not.
Introduction              Basics            Using git      Other          final



                       What does “distributed” mean?




           • Everything is local.
           • No “need” for a centralized repository.
           • Disk is cheap - network is not.
           • Lower threshold for new developers, you don’t need special
               access to the repository to get started.
Introduction                Basics        Using git   Other   final



                                     git objects


        • type
               •   blob
               •   tree
               •   commit
               •   tag
        • size
        • content
Introduction                Basics         Using git                Other          final



                                     git objects


        • type
               •   blob
               •   tree
               •   commit
               •   tag
        • size
        • content



                                       Figure: git example.credits: Scott Chacon
Introduction            Basics          Using git   Other   final



                                 Normal commands




           • git clone repo dest


           • git init
Introduction              Basics          Using git       Other   final



                                   Normal commands




           • git status


           • git log start..end


           • git branch name of new branch start commit


           • git checkout branchname
Introduction            Basics          Using git   Other   final



                                 Normal commands




           • git add path/to/file


           • git commit -s -m “short commit msg”


           • git rebase -i commit


           • git cherry-pick commit
Introduction              Basics          Using git   Other   final



                                   Normal commands




           • git remote


           • git push


           • git pull


           • git fetch
Introduction            Basics          Using git   Other   final



                                 Normal commands




           • git tag


           • git diff


           • git format-patch


           • git am
Introduction            Basics           Using git         Other   final



                                 Normal commands




           • git config –global user.name “Henrik Austad”


           • git config –global user.email “henrik@austad.us”


           • git config user.email “local@project.mail”


           • git config push.default current
Introduction             Basics            Using git           Other        final



                            git merge vs. git rebase




               An example, 3 branches, commits done in alphabetical order
Introduction       Basics            Using git          Other   final



                      git merge vs. git rebase




               Merge F and D giving H, then H and G giving I
Introduction          Basics            Using git           Other     final



                         git merge vs. git rebase




               Rebase F onto D, rewriting F to F’, then C-F’ onto G
Introduction              Basics   Using git         Other   final



                      Hooks - it’s a kind of magic




       See .git/hooks/



           • pre-commit
           • post-update
Introduction            Basics         Using git   Other   final



                                 Visualization




           • git log –graph


           • git-gui


           • gitk


           • qgit
Introduction       Basics           Using git   Other     final



                             Questions?




       http://git-scm.com/

       mailto:git@vger.kernel.org

       http://www.kernel.org/pub/software/scm/git/docs/
       everyday.html

Contenu connexe

Tendances

Git: A Getting Started Presentation
Git: A Getting Started PresentationGit: A Getting Started Presentation
Git: A Getting Started PresentationNap Ramirez
 
SouthEast LinuxFest 2015 - intro to git
SouthEast LinuxFest 2015 -  intro to gitSouthEast LinuxFest 2015 -  intro to git
SouthEast LinuxFest 2015 - intro to gitedgester
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github Max Claus Nunes
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHubRick Umali
 
How to store large binary files in git repositories
How to store large binary files in git repositoriesHow to store large binary files in git repositories
How to store large binary files in git repositoriesMatt Aunger
 
Github Case Study By Amil Ali
Github Case Study By Amil AliGithub Case Study By Amil Ali
Github Case Study By Amil AliAmilAli1
 
Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015
Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015
Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015DevOpsDays Tel Aviv
 
Nyc Code Camp 2010 Git And Github
Nyc Code Camp 2010 Git And GithubNyc Code Camp 2010 Git And Github
Nyc Code Camp 2010 Git And Githubjptoto
 
Git tech talk
Git tech talkGit tech talk
Git tech talkrazasayed
 
Git and fundamentals
Git and fundamentalsGit and fundamentals
Git and fundamentalsNaincy Gupta
 
Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GITGhadiAlGhosh
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to GitColin Su
 
Git locally git rm/revert/reset
Git locally git rm/revert/resetGit locally git rm/revert/reset
Git locally git rm/revert/resetahmadezzeir
 
Git isthenewsexy
Git isthenewsexyGit isthenewsexy
Git isthenewsexyAilsa126
 

Tendances (20)

Git: A Getting Started Presentation
Git: A Getting Started PresentationGit: A Getting Started Presentation
Git: A Getting Started Presentation
 
SouthEast LinuxFest 2015 - intro to git
SouthEast LinuxFest 2015 -  intro to gitSouthEast LinuxFest 2015 -  intro to git
SouthEast LinuxFest 2015 - intro to git
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
How to store large binary files in git repositories
How to store large binary files in git repositoriesHow to store large binary files in git repositories
How to store large binary files in git repositories
 
Github Case Study By Amil Ali
Github Case Study By Amil AliGithub Case Study By Amil Ali
Github Case Study By Amil Ali
 
Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015
Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015
Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015
 
Docker&kubernetes
Docker&kubernetesDocker&kubernetes
Docker&kubernetes
 
Github
GithubGithub
Github
 
Nyc Code Camp 2010 Git And Github
Nyc Code Camp 2010 Git And GithubNyc Code Camp 2010 Git And Github
Nyc Code Camp 2010 Git And Github
 
Github
GithubGithub
Github
 
Presentacion git
Presentacion gitPresentacion git
Presentacion git
 
Git tech talk
Git tech talkGit tech talk
Git tech talk
 
Git and fundamentals
Git and fundamentalsGit and fundamentals
Git and fundamentals
 
Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GIT
 
GitHub Introduction
GitHub IntroductionGitHub Introduction
GitHub Introduction
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git locally git rm/revert/reset
Git locally git rm/revert/resetGit locally git rm/revert/reset
Git locally git rm/revert/reset
 
Git isthenewsexy
Git isthenewsexyGit isthenewsexy
Git isthenewsexy
 
Git (Internals)
Git (Internals)Git (Internals)
Git (Internals)
 

En vedette

git stupid, fast, distributed content tracker
git stupid, fast, distributed content trackergit stupid, fast, distributed content tracker
git stupid, fast, distributed content trackerMozammel Haque
 
Confusa Cyprus
Confusa CyprusConfusa Cyprus
Confusa Cyprushenrikau
 
Music video production
Music video productionMusic video production
Music video productionShannon Horton
 
TCS eScience Portal - Confusa
TCS eScience Portal - ConfusaTCS eScience Portal - Confusa
TCS eScience Portal - Confusahenrikau
 
Time Sensitive Networking in the Linux Kernel
Time Sensitive Networking in the Linux KernelTime Sensitive Networking in the Linux Kernel
Time Sensitive Networking in the Linux Kernelhenrikau
 
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika AldabaLightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldabaux singapore
 

En vedette (8)

git stupid, fast, distributed content tracker
git stupid, fast, distributed content trackergit stupid, fast, distributed content tracker
git stupid, fast, distributed content tracker
 
Confusa Cyprus
Confusa CyprusConfusa Cyprus
Confusa Cyprus
 
Music video production
Music video productionMusic video production
Music video production
 
TCS eScience Portal - Confusa
TCS eScience Portal - ConfusaTCS eScience Portal - Confusa
TCS eScience Portal - Confusa
 
Time Sensitive Networking in the Linux Kernel
Time Sensitive Networking in the Linux KernelTime Sensitive Networking in the Linux Kernel
Time Sensitive Networking in the Linux Kernel
 
AVB intro
AVB introAVB intro
AVB intro
 
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika AldabaLightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
 
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job? Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
 

Similaire à git - the stupid content tracker

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
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notesglen_a_smith
 
Git, GitHub and Open Source
Git, GitHub and Open SourceGit, GitHub and Open Source
Git, GitHub and Open SourceLorna Mitchell
 
Enterprise git
Enterprise gitEnterprise git
Enterprise gitPedro Melo
 
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 GitHubBigBlueHat
 
Gitting the Most From Git
Gitting the Most From GitGitting the Most From Git
Gitting the Most From GitChris Miller
 
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
 
Let's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubLet's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubKim Moir
 

Similaire à git - the stupid content tracker (20)

Learn Git - For Beginners and Intermediate levels
Learn Git - For Beginners and Intermediate levelsLearn Git - For Beginners and Intermediate levels
Learn Git - For Beginners and Intermediate levels
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
 
Git
GitGit
Git
 
git and github
git and githubgit and github
git and github
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
 
Git basics
Git basicsGit basics
Git basics
 
Git, GitHub and Open Source
Git, GitHub and Open SourceGit, GitHub and Open Source
Git, GitHub and Open Source
 
Git workshop
Git workshopGit workshop
Git workshop
 
Enterprise git
Enterprise gitEnterprise git
Enterprise git
 
GIT-FirstPart.ppt
GIT-FirstPart.pptGIT-FirstPart.ppt
GIT-FirstPart.ppt
 
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
 
Gitting the Most From Git
Gitting the Most From GitGitting the Most From Git
Gitting the Most From Git
 
Git Real
Git RealGit Real
Git Real
 
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 basics
Git basicsGit basics
Git basics
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Intro to Git & GitHub
Intro to Git & GitHubIntro to Git & GitHub
Intro to Git & GitHub
 
Let's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubLet's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHub
 
Git 101 for_tarad_dev
Git 101 for_tarad_devGit 101 for_tarad_dev
Git 101 for_tarad_dev
 
Git presentation
Git presentationGit presentation
Git presentation
 

git - the stupid content tracker

  • 1. Introduction Basics Using git Other final Git - the stupid content tracker Henrik Austad UNINETT Sigma A/S 15. Oct 2009
  • 2. Introduction Basics Using git Other final about:henrik Henrik Austad MSc Engineering Cybernetics UNINETT Sigma A/S & NDGF System Developer
  • 3. Introduction Basics Using git Other final Background - In the beginning ... was patch • Initially written by Linus Torvalds to replace BitKeeper • First “working” version: April 18th 2005 • git v1.0 December 21th 2005 • Written for • Speed • Track changes • Large projects with active history
  • 4. Introduction Basics Using git Other final Contenders • Bazaar (bzr) • Darcs • Mercurial (hg) • svk
  • 5. Introduction Basics Using git Other final What does “distributed” mean? • Everything is local.
  • 6. Introduction Basics Using git Other final What does “distributed” mean? • Everything is local. • No “need” for a centralized repository.
  • 7. Introduction Basics Using git Other final What does “distributed” mean? • Everything is local. • No “need” for a centralized repository. • Disk is cheap - network is not.
  • 8. Introduction Basics Using git Other final What does “distributed” mean? • Everything is local. • No “need” for a centralized repository. • Disk is cheap - network is not. • Lower threshold for new developers, you don’t need special access to the repository to get started.
  • 9. Introduction Basics Using git Other final git objects • type • blob • tree • commit • tag • size • content
  • 10. Introduction Basics Using git Other final git objects • type • blob • tree • commit • tag • size • content Figure: git example.credits: Scott Chacon
  • 11. Introduction Basics Using git Other final Normal commands • git clone repo dest • git init
  • 12. Introduction Basics Using git Other final Normal commands • git status • git log start..end • git branch name of new branch start commit • git checkout branchname
  • 13. Introduction Basics Using git Other final Normal commands • git add path/to/file • git commit -s -m “short commit msg” • git rebase -i commit • git cherry-pick commit
  • 14. Introduction Basics Using git Other final Normal commands • git remote • git push • git pull • git fetch
  • 15. Introduction Basics Using git Other final Normal commands • git tag • git diff • git format-patch • git am
  • 16. Introduction Basics Using git Other final Normal commands • git config –global user.name “Henrik Austad” • git config –global user.email “henrik@austad.us” • git config user.email “local@project.mail” • git config push.default current
  • 17. Introduction Basics Using git Other final git merge vs. git rebase An example, 3 branches, commits done in alphabetical order
  • 18. Introduction Basics Using git Other final git merge vs. git rebase Merge F and D giving H, then H and G giving I
  • 19. Introduction Basics Using git Other final git merge vs. git rebase Rebase F onto D, rewriting F to F’, then C-F’ onto G
  • 20. Introduction Basics Using git Other final Hooks - it’s a kind of magic See .git/hooks/ • pre-commit • post-update
  • 21. Introduction Basics Using git Other final Visualization • git log –graph • git-gui • gitk • qgit
  • 22. Introduction Basics Using git Other final Questions? http://git-scm.com/ mailto:git@vger.kernel.org http://www.kernel.org/pub/software/scm/git/docs/ everyday.html