1 / 15

Introductory Notes on the Git Source Control Management

Introductory Notes on the Git Source Control Management. Ric Holt, 8 Oct 2009. Git is a SCM (Source Control Management System). Management of changes to documents, programs, and other information stored as computer files. Its first usage have been for Linux and for Git itself.

devon
Download Presentation

Introductory Notes on the Git Source Control Management

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introductory Notes on the Git Source Control Management Ric Holt, 8 Oct 2009

  2. Git is a SCM (Source Control Management System) • Management of changes to documents, programs, and other information stored as computer files. • Its first usage have been for Linux and for Git itself. • It is open source and free

  3. Torvalds and “Git” • Written by Linus Torvalds -- Mr. Linux • What does the word “git” mean? • Nothing? • “A person who is deemed to be despicable or contemptible “ ? • From http://www.google.ca/search?hl=en&client=firefox-a&rls=org.mozilla:en-US:official&hs=Ll1&defl=en&q=define:git&ei=wi7NSofxA4rflAevs-TgBQ&sa=X&oi=glossary_definition&ct=title

  4. Git: A Fast Version Control System • Git • Is distributed • Has no master copy • Has fast merges • Is controversial • Scales up • Convenient tools still being built • Safeguards against corruption

  5. Bibliography • Overview of Git (1 hour video).by Randal Schartz, 2007, Google talk, no diagrams http://www.youtube.com/watch?v=8dhZ9BXQgc4 • Tv's cobweb: Git for Computer Scientists (nice diagrams) http://eagain.net/articles/git-for-computer-scientists/ • A tutorial introduction to Git (key examples uses of commands) • http://www.kernel.org/pub/software/scm/git/docs/v1.2.6/tutorial.html

  6. UW CS746 Seminar Course on Software Architecture • Studying Git architecture (Fall 2009) • Suggested/clarified various ideas given here

  7. Fundamental Concepts of Source Control Management • Source control management =SCM. Records information about an evolving software project). Key example: CVS. • Project (set of files and directories, typically comprising the source files of a software system under development, but could be any other “content”) • Version (one instance of a project) (called a commit in Git)

  8. More Fundamental Concepts of Source Control Management • Branch. A sequence of versions, each one evolved from the previous one • To branch. Split development into two parallel branches. • To merge.Combine two branches into single branch • Repository. In this case, a specialized database to store an evolving project with its branches

  9. Git’s Distributed Architecture: P2P Ovals are servers R2 R1 R3 Boxes are individual repositories R4 R5 System of distributed repositories R1, R2, ... Mostly Git repositories, but can be CVS etc.

  10. Architecture of Git Individual Repository Object storage. Some times called simply a repository. Stores representation of the versions of project (in a directory called .git ) Git’s Index. Caches objects from work space that have changed (added to index), and that will be stored in the repository with the next commit Work space. User’s sandbox (ordinary files and directories) for active version

  11. Architecture of Git Individual Repository One Repository add commit Working tree (sand box) Index (cache) Object store pull, push More Repositories

  12. Data Structure of Repository: ERD Defines Allowed DAGs Each commit (version) is based on zero or more previous versions commit version tree Each folder contains other folders and files (blobs) tree of folders blob file Generally, committed structure is immutable

  13. Naming Nodes by Their Hashes • The name (or key) of a node is the hash (SHA1) of its contents. • A hash can be used as a “pointer” to locate its content • Identical files have the same hash and are represented by a single blob

  14. Layered Structure of Implementation of Repository GUI Porcelain (High Level Operations) Plumbing (Low Level Operations) Operations are separate executables (not API)

  15. 1)      Init. Create an empty Git repository 2)      Clone. Copy a repository into a new directory. After cloning, edit, create and remove files for new version 3)      Add. Add file contents from work space to the index. (The files are edited locally) 4)      Remove = rm. Remove files from work space and from the index 5)      Commit. Store the changes (that are added) to the repository, using the index. Completes this version. 6)      Branch. Create (or delete) a branch 7)      Merge. Join two or more branches 8)      Rebase. Combine/restructure a set of commits to simplify them 9)      Checkout. Checkout files etc from a commit, and switch work space to that new branch 10)      Fetch. Download objects and refs from another repository 11)      Pull. Fetch from and merge with another repository or a local branch 12)      Push. Update remote refs (in another repo) along with associated objects Key Git Operations

More Related