Git, Fast and Distributed Source Code Management

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    3 Favorites

    Git, Fast and Distributed Source Code Management - Presentation Transcript

    1. Git, Fast and Distributed Version Control System Salimane Adjao Moustapha [email_address] http://theindexer.wordpress.com Ethos Technologies
    2. Introduction
    3. Summary
      • What is git?
      • Difference git and other SCMs
      • Git Object Model
      • Why git is better than X
      • Benefits of using git for an engineer
      • Benefits if using git repos in a company
      • Sample git commands
      • Conclusion
    4. What is git?
      • Distributed development.
      • Strong support for non-linear development.
      • Efficient handling of large projects.
    5. Difference git and other SCMs
      • Other SCMs
      • - Delta Storage Systems
      • - Tracking file permissions and ownership
      • Git
      • - Snapshot of what all the files in your project look like in this tree structure, each time you commit. Track changes of the tree through time.
      • - Tracking the content of the file, not the container
    6. Git Object Model
      • The SHA
      • All the information needed to represent the history of a project is stored in files referenced by a 40-digit "object name" that looks something like this:
      • 6ff87c4664981e4397625791c8ea3bbb5f2279a3
      • This has a number of advantages among others:
        • Git can quickly determine whether two objects are identical or not, just by comparing names.
        • Since object names are computed the same way in every repository, the same content stored in two repositories will always be stored under the same name.
        • Git can detect errors when it reads an object, by checking that the object's name is still the SHA1 hash of its contents.
      • The Objects
      • Every object consists of three things - a type , a size and content . The size is simply the size of the contents, the contents depend on what type of object it is, and there are four different types of objects:
        • A "blob" is used to store file data - it is generally a file.
        • A "tree" is basically like a directory - it references a bunch of other trees and/or blobs (i.e. files and sub-directories)
        • A "commit" points to a single tree, marking it as what the project looked like at a certain point in time. It contains meta-information about that point in time, such as a timestamp, the author of the changes since the last commit, a pointer to the previous commit(s), etc.
        • A "tag" is a way to mark a specific commit as special in some way. It is normally used to tag certain commits as specific releases or something along those lines.
    7. Blob Object A blob generally stores the contents of a file. git show 6ff87c466498...
    8. Tree Object A tree is a simple object that has a bunch of pointers to blobs and other trees - it generally represents the contents of a directory or subdirectory. git ls-tree 6ff87c466498...
    9. Commit Object The "commit" object links a physical state of a tree with a description of how we got there and why. git show -s --pretty=raw 6ff87c466498...
    10. . -- README -- lib/ --inc/ --tricks.rb --mylib.rb
    11. Why git is better than X
        • Cheap local branching
        • Complex merging
        • Everything is Local
        • Git is fast
        • Git is small
        • Easy to learn
    12. Benefits of using git for an engineer
        • You can work offline on your notebook and track every changes you're doing to the codes without anybody noticing anything.
        • You can work in parrallel on many tasks.
        • You can make mistakes and erase your mistakes.
        • You can edit commit and the commit will look like everything was done once.
        • You can stash your local modifications and replay them later.
        • You can pull from a collegue repo without the server and others being notified
        • You become productive because instead wasting time copying, recoding, committing or updating codes, you can concentrate on changing the actual source codes.
        • Intuitive commands.
        • Creating patches easily (emailing patches easily).
        • You can use git with subversion or cvs repositories.
        • You don't have to have commit permissions to start making changes and tracking them. (patch, publish).
        • One directory .git, no more deeper polluting directories like svn.
    13. Typical workflow
    14. Benefits of using git repos in a company
        • Better impressions on clients / partners
        • Easy management of your repositories
        • Saving disk space on your servers
        • Less load on your servers
        • Get more productive time from your engineers
        • Saving Money
    15. Sample git commands
        • git init
        • git add .
        • git commit
        • git clone url
        • git branch -r
        • git stash
        • git stash apply
        • git checkout -b task1 master
        • git commit -a -m “task1 solution”
        • git diff --binary HEAD > tempPatch.diff
        • git diff task1 HEAD~2
        • git reset –hard
        • git status
        • git-checkout master
        • git merge task1
        • git-branch -d task1
        • git-rebase -i task1 task2
        • git fetch
        • git push
        • git reset HEAD~3
        • git revert
    16. Projects using git
        • Linux Kernel
        • Android
        • Fedora
        • Perl
        • Ruby on Rails
        • Gnome
        • ....
    17. Tutorial
        • http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html
        • http://git-scm.com/course/svn.html
        • http://www.spheredev.org/wiki/Git_for_the_lazy
        • http://excess.org/article/2008/07/ogre-git-tutorial/
        • http://gitcasts.com/
        • http://book.git-scm.com/5_git_and_email.html
        • http://book.git-scm.com/5_customizing_git.html

    + Salimane Adjao MoustaphaSalimane Adjao Moustapha, 8 months ago

    custom

    1259 views, 3 favs, 1 embeds more stats

    Git, Fast and Distributed Source Code Management

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1259
      • 1183 on SlideShare
      • 76 from embeds
    • Comments 0
    • Favorites 3
    • Downloads 35
    Most viewed embeds
    • 76 views on http://theindexer.wordpress.com

    more

    All embeds
    • 76 views on http://theindexer.wordpress.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories