BitKeeper broke down – This prompted the Linus Torvalds the creator of Linux to develop their own tool based on some of the lessons they learned while using BitKeeper – Since its birth in 2005 , Git has evolved and matured to be easy to use
BITS Pilani, Pilani Campus Introduction to Git Contd… • A Short History of Git: – The qualities considered for the development of Git was: • Speed • Simple design • Strong support for non-linear development (thousands of parallel branches) • Fully distributed • Able to handle large projects like the Linux kernel efficiently (speed and data size)
BITS Pilani, Pilani Campus Introduction to Git Contd… • What is Different in Git?
BITS Pilani, Pilani Campus Introduction to Git Contd… • This is How Git treats:
BITS Pilani, Pilani Campus Introduction to Git Contd… • Nearly Every Operation Is Local: – Most operations in Git need only local files and resources to operate – you have the entire history of the project right there on your local disk, most operations seem almost instantaneous • Git Has Integrity – Everything in Git is check-summed before it is stored and is then referred to by that checksum – You can’t lose information in transit or get file corruption without Git being able to detect it. • Git Generally Only Adds Data – When you do actions in Git, nearly all of them only add data to the Git database – After you commit a snapshot into Git, it is very difficult to lose, especially if you regularly push your database to another repository
BITS Pilani, Pilani Campus Introduction to Git Contd… • The three states of Git: • Git has three main states that your files can reside in: – Committed : Committed means that the data is safely stored in your local database – Modified : Modified means that you have changed the file but have not committed it to your database yet – Staged : Staged means that you have marked a modified file in its current version to go into your next commit snapshot
BITS Pilani, Pilani Campus A Git Project: • The Git directory: – It is where Git stores the metadata and object database for your project – It is copied when you clone a repository from another computer • The working tree: – It is a single checkout of one version of the project – These files are pulled out of the compressed database in the Git directory and placed on disk for you to use or modify • The staging area: – It is a file, generally contained in your Git directory – It stores information about what will go into your next commit – Its technical name in Git parlance Introduction to Git Contd…
BITS Pilani, Pilani Campus Introduction to Git Contd… The basic Git workflow: – You modify files in your working tree – You selectively stage just those changes you want to be part of your next commit; which adds only those changes to the staging area – You do a commit; which takes the files as they are in the staging area and stores that snapshot permanently to your Git directory
You've reached the end of your free preview.
Want to read all 364 pages?
- Fall '19