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

PPTX
11 git version control
PDF
Git in Eclipse
KEY
Helios in Action: Git at Eclipse
ODP
GIT - DUG Antwerp
ODP
Git for standalone use
PDF
Contributing to open source using Git
PPTX
Git 101
PDF
Git training with Devaamo
11 git version control
Git in Eclipse
Helios in Action: Git at Eclipse
GIT - DUG Antwerp
Git for standalone use
Contributing to open source using Git
Git 101
Git training with Devaamo

What's hot (20)

PDF
Git: A Getting Started Presentation
PDF
SouthEast LinuxFest 2015 - intro to git
PPTX
Introduction to Git and Github
PDF
Git and GitHub
PDF
How to store large binary files in git repositories
PDF
Github Case Study By Amil Ali
PDF
Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015
PDF
PPTX
PPT
Nyc Code Camp 2010 Git And Github
PPTX
PDF
Presentacion git
ODP
Git tech talk
PPT
Git and fundamentals
PDF
Getting started With GIT
PDF
GitHub Introduction
PDF
Introduction to Git
PPTX
Git locally git rm/revert/reset
KEY
Git isthenewsexy
PDF
Git (Internals)
Git: A Getting Started Presentation
SouthEast LinuxFest 2015 - intro to git
Introduction to Git and Github
Git and GitHub
How to store large binary files in git repositories
Github Case Study By Amil Ali
Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015
Nyc Code Camp 2010 Git And Github
Presentacion git
Git tech talk
Git and fundamentals
Getting started With GIT
GitHub Introduction
Introduction to Git
Git locally git rm/revert/reset
Git isthenewsexy
Git (Internals)
Ad

Viewers also liked (8)

PDF
git stupid, fast, distributed content tracker
ODP
Confusa Cyprus
PPTX
Music video production
PDF
TCS eScience Portal - Confusa
PDF
Time Sensitive Networking in the Linux Kernel
PDF
AVB intro
PDF
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
PDF
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
git stupid, fast, distributed content tracker
Confusa Cyprus
Music video production
TCS eScience Portal - Confusa
Time Sensitive Networking in the Linux Kernel
AVB intro
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?
Ad

Similar to git - the stupid content tracker (20)

PPTX
Learn Git - For Beginners and Intermediate levels
PPTX
Git One Day Training Notes
PPTX
PDF
git and github
PDF
Intro to Git and GitHub
PDF
Git, GitHub and Open Source
PPTX
Introduction to git and githhub with practicals.pptx
PPTX
Git-guidance for beginner- IT support.pptx.pptx
PPTX
Git-guidance for beginner- IT support.pptx
PDF
Git workshop
PDF
Enterprise git
PPT
GIT-FirstPart.ppt
PDF
The Basics of Open Source Collaboration With Git and GitHub
KEY
Gitting the Most From Git
PDF
Git Real
PPT
Git is a distributed version control system .
PPT
Introduction to git
PDF
Intro to Git & GitHub
KEY
Let's Git this Party Started: An Introduction to Git and GitHub
PPTX
Git 101 for_tarad_dev
Learn Git - For Beginners and Intermediate levels
Git One Day Training Notes
git and github
Intro to Git and GitHub
Git, GitHub and Open Source
Introduction to git and githhub with practicals.pptx
Git-guidance for beginner- IT support.pptx.pptx
Git-guidance for beginner- IT support.pptx
Git workshop
Enterprise git
GIT-FirstPart.ppt
The Basics of Open Source Collaboration With Git and GitHub
Gitting the Most From Git
Git Real
Git is a distributed version control system .
Introduction to git
Intro to Git & GitHub
Let's Git this Party Started: An Introduction to Git and GitHub
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