SlideShare a Scribd company logo
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

More Related Content

What's hot

Git: A Getting Started Presentation
Git: A Getting Started PresentationGit: A Getting Started Presentation
Git: A Getting Started Presentation
Nap Ramirez
 
SouthEast LinuxFest 2015 - intro to git
SouthEast LinuxFest 2015 -  intro to gitSouthEast LinuxFest 2015 -  intro to git
SouthEast LinuxFest 2015 - intro to git
edgester
 
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 GitHub
Rick 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 repositories
Matt Aunger
 
Github Case Study By Amil Ali
Github Case Study By Amil AliGithub Case Study By Amil Ali
Github Case Study By Amil Ali
AmilAli1
 
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
DevOpsDays Tel Aviv
 
Docker&kubernetes
Docker&kubernetesDocker&kubernetes
Github
GithubGithub
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
jptoto
 
Github
GithubGithub
Presentacion git
Presentacion gitPresentacion git
Presentacion git
Ignacio Martín
 
Git tech talk
Git tech talkGit tech talk
Git tech talk
razasayed
 
Git and fundamentals
Git and fundamentalsGit and fundamentals
Git and fundamentals
Naincy Gupta
 
Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GIT
GhadiAlGhosh
 
GitHub Introduction
GitHub IntroductionGitHub Introduction
GitHub Introduction
VIA Next Innovators
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
Colin Su
 
Git locally git rm/revert/reset
Git locally git rm/revert/resetGit locally git rm/revert/reset
Git locally git rm/revert/reset
ahmadezzeir
 
Git isthenewsexy
Git isthenewsexyGit isthenewsexy
Git isthenewsexy
Ailsa126
 
Git (Internals)
Git (Internals)Git (Internals)
Git (Internals)
Sabin Bhatta
 

What's hot (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)
 

Viewers also liked

git stupid, fast, distributed content tracker
git stupid, fast, distributed content trackergit stupid, fast, distributed content tracker
git stupid, fast, distributed content tracker
Mozammel Haque
 
Confusa Cyprus
Confusa CyprusConfusa Cyprus
Confusa Cyprus
henrikau
 
Music video production
Music video productionMusic video production
Music video production
Shannon Horton
 
TCS eScience Portal - Confusa
TCS eScience Portal - ConfusaTCS eScience Portal - Confusa
TCS eScience Portal - Confusa
henrikau
 
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
henrikau
 
AVB intro
AVB introAVB intro
AVB intro
henrikau
 
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
ux singapore
 
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?
Stanford GSB Corporate Governance Research Initiative
 

Viewers also liked (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?
 

Similar to 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 levels
Gorav Singal
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
glen_a_smith
 
Git
GitGit
git and github
git and githubgit and github
git and github
Darren Oakley
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
Panagiotis Papadopoulos
 
Git basics
Git basicsGit basics
Git basics
terencechia88
 
Git, GitHub and Open Source
Git, GitHub and Open SourceGit, GitHub and Open Source
Git, GitHub and Open Source
Lorna Mitchell
 
Introduction to git and githhub with practicals.pptx
Introduction to git and githhub with practicals.pptxIntroduction to git and githhub with practicals.pptx
Introduction to git and githhub with practicals.pptx
Abdul Salam
 
Git workshop
Git workshopGit workshop
Git workshop
Al Sayed Gamal
 
Enterprise git
Enterprise gitEnterprise git
Enterprise git
Pedro Melo
 
GIT-FirstPart.ppt
GIT-FirstPart.pptGIT-FirstPart.ppt
GIT-FirstPart.ppt
ssusered2ec2
 
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
BigBlueHat
 
Gitting the Most From Git
Gitting the Most From GitGitting the Most From Git
Gitting the Most From Git
Chris Miller
 
Git Real
Git RealGit Real
Git Real
Gong Haibing
 
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 basics
Git basicsGit basics
Git basics
glitchdata
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
Nguyen Van Hung
 
Intro to Git & GitHub
Intro to Git & GitHubIntro to Git & GitHub
Intro to Git & GitHub
GoogleDevelopersStud
 
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
Kim Moir
 
Git 101 for_tarad_dev
Git 101 for_tarad_devGit 101 for_tarad_dev
Git 101 for_tarad_dev
Somkiat Puisungnoen
 

Similar to 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
 
Introduction to git and githhub with practicals.pptx
Introduction to git and githhub with practicals.pptxIntroduction to git and githhub with practicals.pptx
Introduction to git and githhub with practicals.pptx
 
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 - 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